ref: 重新修改包名以及groupId

main
lensfrex 1 year ago
parent e4473af4d7
commit bf828e3418
Signed by: lensfrex
GPG Key ID: 0F69A0A2FBEE98A0
  1. 2
      README.md
  2. 2
      mywust-common/pom.xml
  3. 3
      mywust-common/src/main/java/cn/wustlinghang/mywust/captcha/SolvedImageCaptcha.java
  4. 2
      mywust-common/src/main/java/cn/wustlinghang/mywust/captcha/UnsolvedImageCaptcha.java
  5. 2
      mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Building.java
  6. 2
      mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Campus.java
  7. 2
      mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Classroom.java
  8. 2
      mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/College.java
  9. 2
      mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Course.java
  10. 2
      mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/Score.java
  11. 2
      mywust-common/src/main/java/cn/wustlinghang/mywust/data/global/StudentInfo.java
  12. 4
      mywust-common/src/main/java/cn/wustlinghang/mywust/data/physics/PhysicsCourse.java
  13. 2
      mywust-common/src/main/java/cn/wustlinghang/mywust/data/undergrad/ExamDelayApplication.java
  14. 2
      mywust-common/src/main/java/cn/wustlinghang/mywust/exception/ApiException.java
  15. 2
      mywust-common/src/main/java/cn/wustlinghang/mywust/exception/BasicException.java
  16. 2
      mywust-common/src/main/java/cn/wustlinghang/mywust/exception/ParseException.java
  17. 8
      mywust-core/pom.xml
  18. 7
      mywust-core/src/main/java/cn/linghang/mywust/core/parser/Parser.java
  19. 9
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/captcha/solver/CaptchaSolver.java
  20. 2
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/ConstantParams.java
  21. 2
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/GraduateUrls.java
  22. 2
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/LibraryUrls.java
  23. 2
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/PhysicsSystemUrls.java
  24. 2
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/UndergradUrls.java
  25. 2
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/api/UnionAuthUrls.java
  26. 6
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/HuangjiahuClassroomNameParser.java
  27. 7
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/Parser.java
  28. 10
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateCourseTableParser.java
  29. 8
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateScoreParser.java
  30. 10
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateStudentInfoPageParser.java
  31. 8
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/graduate/GraduateTrainingPlanPageParser.java
  32. 12
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsCoursePageParser.java
  33. 6
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsIndexPageParser.java
  34. 8
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsScoreListPageParser.java
  35. 10
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/physics/PhysicsScorePageParser.java
  36. 16
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradCourseTableParser.java
  37. 6
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradCreditStatusIndexParser.java
  38. 6
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradCreditStatusParser.java
  39. 10
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradExamDelayParser.java
  40. 10
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradScoreParser.java
  41. 10
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradStudentInfoPageParser.java
  42. 6
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/UndergradTrainingPlanPageParser.java
  43. 10
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/global/GlobalCourseTableParser.java
  44. 8
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/global/UndergradAllCourseScheduleParser.java
  45. 8
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/parser/undergraduate/global/UndergradTeacherCourseParser.java
  46. 4
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/RequestFactory.java
  47. 10
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/auth/UnionAuthRequestFactory.java
  48. 16
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/graduate/GraduateRequestFactory.java
  49. 11
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/library/LibraryRequestFactory.java
  50. 2
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/library/request/SearchRequest.java
  51. 12
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/physics/PhysicsSystemRequestFactory.java
  52. 15
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/undergrade/BkjxRequestFactory.java
  53. 16
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/factory/undergrade/global/BkjxAllCourseRequestFactory.java
  54. 29
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/GraduateLogin.java
  55. 20
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/LibraryLogin.java
  56. 20
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/PhysicsLogin.java
  57. 22
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/UndergraduateLogin.java
  58. 16
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/auth/UnionLogin.java
  59. 9
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/captcha/solver/CaptchaSolver.java
  60. 18
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/captcha/solver/DdddOcrCaptchaSolver.java
  61. 22
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/captcha/solver/LinghangOcrServiceCaptchaSolver.java
  62. 18
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateApiServiceBase.java
  63. 16
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateCourseTableApiService.java
  64. 16
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateScoreApiService.java
  65. 16
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateStudentInfoApiService.java
  66. 16
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/graduate/GraduateTrainingPlanApiService.java
  67. 12
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/library/LibraryApiService.java
  68. 8
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/library/LibraryApiServiceBase.java
  69. 8
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/physics/PhysicsApiServiceBase.java
  70. 16
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/physics/PhysicsCourseApiService.java
  71. 22
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/physics/PhysicsScoreApiService.java
  72. 20
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradApiServiceBase.java
  73. 16
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradCourseTableApiService.java
  74. 20
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradCreditStatusApiService.java
  75. 14
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradExamDelayApiService.java
  76. 16
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradScoreApiService.java
  77. 16
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradStudentInfoApiService.java
  78. 16
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/UndergradTrainingPlanApiService.java
  79. 18
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradAllCourseScheduleApiService.java
  80. 24
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradBuildingIdApiService.java
  81. 18
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradClassroomCourseApiService.java
  82. 18
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/request/service/undergraduate/global/UndergradTeacherCourseApiService.java
  83. 2
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/util/BkjxUtil.java
  84. 2
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/util/JsoupUtil.java
  85. 2
      mywust-core/src/main/java/cn/wustlinghang/mywust/core/util/PageFormExtractor.java
  86. 2
      mywust-network-httpclient/pom.xml
  87. 6
      mywust-network-okhttp/pom.xml
  88. 2
      mywust-network-okhttp/src/main/java/cn/wustlinghang/mywust/network/okhttp/RedirectInterceptor.java
  89. 14
      mywust-network-okhttp/src/main/java/cn/wustlinghang/mywust/network/okhttp/SimpleOkhttpRequester.java
  90. 2
      mywust-network-okhttp/src/main/java/cn/wustlinghang/mywust/network/okhttp/TrustAllCert.java
  91. 4
      mywust-network/pom.xml
  92. 18
      mywust-network/src/main/java/cn/wustlinghang/mywust/network/RequestClientOption.java
  93. 6
      mywust-network/src/main/java/cn/wustlinghang/mywust/network/Requester.java
  94. 6
      mywust-network/src/main/java/cn/wustlinghang/mywust/network/entitys/FormBodyBuilder.java
  95. 2
      mywust-network/src/main/java/cn/wustlinghang/mywust/network/entitys/HttpRequest.java
  96. 9
      mywust-network/src/main/java/cn/wustlinghang/mywust/network/entitys/HttpResponse.java
  97. 6
      mywust-test/pom.xml
  98. 2
      mywust-util/pom.xml
  99. 2
      mywust-util/src/main/java/cn/wustlinghang/mywust/util/PasswordEncoder.java
  100. 2
      mywust-util/src/main/java/cn/wustlinghang/mywust/util/RepeatableComparator.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -67,7 +67,7 @@ JDK版本:1.8及以上,推荐JDK 11及以上
```xml
<dependency>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<artifactId>mywust-core</artifactId>
<version>0.0.1-fixed</version>
</dependency>

@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>mywust</artifactId>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -1,6 +1,5 @@
package cn.linghang.mywust.captcha;
package cn.wustlinghang.mywust.captcha;
import lombok.Data;
import lombok.Getter;
/**

@ -1,4 +1,4 @@
package cn.linghang.mywust.captcha;
package cn.wustlinghang.mywust.captcha;
import lombok.AllArgsConstructor;
import lombok.Data;

@ -1,4 +1,4 @@
package cn.linghang.mywust.data.global;
package cn.wustlinghang.mywust.data.global;
import java.util.StringJoiner;

@ -1,4 +1,4 @@
package cn.linghang.mywust.data.global;
package cn.wustlinghang.mywust.data.global;
import java.util.StringJoiner;

@ -1,4 +1,4 @@
package cn.linghang.mywust.data.global;
package cn.wustlinghang.mywust.data.global;
import lombok.AllArgsConstructor;
import lombok.Builder;

@ -1,4 +1,4 @@
package cn.linghang.mywust.data.global;
package cn.wustlinghang.mywust.data.global;
import java.util.StringJoiner;

@ -1,4 +1,4 @@
package cn.linghang.mywust.data.global;
package cn.wustlinghang.mywust.data.global;
import lombok.AllArgsConstructor;
import lombok.Builder;

@ -1,4 +1,4 @@
package cn.linghang.mywust.data.global;
package cn.wustlinghang.mywust.data.global;
import lombok.AllArgsConstructor;
import lombok.Builder;

@ -1,4 +1,4 @@
package cn.linghang.mywust.data.global;
package cn.wustlinghang.mywust.data.global;
import lombok.AllArgsConstructor;
import lombok.Builder;

@ -1,6 +1,6 @@
package cn.linghang.mywust.data.physics;
package cn.wustlinghang.mywust.data.physics;
import cn.linghang.mywust.data.global.Course;
import cn.wustlinghang.mywust.data.global.Course;
import lombok.Getter;
import lombok.Setter;

@ -1,4 +1,4 @@
package cn.linghang.mywust.data.undergrad;
package cn.wustlinghang.mywust.data.undergrad;
import lombok.AllArgsConstructor;
import lombok.Data;

@ -1,4 +1,4 @@
package cn.linghang.mywust.exception;
package cn.wustlinghang.mywust.exception;
public class ApiException extends BasicException {
private final Code code;

@ -1,4 +1,4 @@
package cn.linghang.mywust.exception;
package cn.wustlinghang.mywust.exception;
public class BasicException extends Exception {
public BasicException() {

@ -1,4 +1,4 @@
package cn.linghang.mywust.exception;
package cn.wustlinghang.mywust.exception;
import java.util.StringJoiner;

@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>mywust</artifactId>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -12,13 +12,13 @@
<artifactId>mywust-core</artifactId>
<dependencies>
<dependency>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<artifactId>mywust-network</artifactId>
<version>${project.parent.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<artifactId>mywust-util</artifactId>
<version>${project.parent.version}</version>
</dependency>
@ -37,7 +37,7 @@
</dependency>
<dependency>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<artifactId>mywust-common</artifactId>
<version>${project.parent.version}</version>
<scope>compile</scope>

@ -1,7 +0,0 @@
package cn.linghang.mywust.core.parser;
import cn.linghang.mywust.exception.ParseException;
public interface Parser<T> {
public T parse(String html) throws ParseException;
}

@ -1,9 +0,0 @@
package cn.linghang.mywust.core.request.service.captcha.solver;
import cn.linghang.mywust.captcha.SolvedImageCaptcha;
import cn.linghang.mywust.captcha.UnsolvedImageCaptcha;
import cn.linghang.mywust.exception.ApiException;
public interface CaptchaSolver {
SolvedImageCaptcha solve(UnsolvedImageCaptcha unsolvedImageCaptcha) throws ApiException;
}

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.api;
package cn.wustlinghang.mywust.core.api;
import java.util.Collections;
import java.util.HashMap;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.api;
package cn.wustlinghang.mywust.core.api;
public class GraduateUrls {
public static final String GRADUATE_CAPTCHA_API = "http://59.68.177.189/pyxx/PageTemplate/NsoftPage/yzm/createyzm.aspx";

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.api;
package cn.wustlinghang.mywust.core.api;
public class LibraryUrls {
public static final String LIBRARY_SESSION_COOKIE_API = "https://libsys.wust.edu.cn/meta-local/opac/cas/rosetta?ticket=%s";

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.api;
package cn.wustlinghang.mywust.core.api;
public class PhysicsSystemUrls {
public static final String PHYSICS_LOGIN_INDEX = "http://wlsy.wust.edu.cn/Page/BI/BI000.aspx";

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.api;
package cn.wustlinghang.mywust.core.api;
import lombok.Getter;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.api;
package cn.wustlinghang.mywust.core.api;
public class UnionAuthUrls {
/**

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.parser;
package cn.wustlinghang.mywust.core.parser;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.data.global.Classroom;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.data.global.Classroom;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@ -0,0 +1,7 @@
package cn.wustlinghang.mywust.core.parser;
import cn.wustlinghang.mywust.exception.ParseException;
public interface Parser<T> {
public T parse(String html) throws ParseException;
}

@ -1,9 +1,9 @@
package cn.linghang.mywust.core.parser.graduate;
package cn.wustlinghang.mywust.core.parser.graduate;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.linghang.mywust.data.global.Classroom;
import cn.linghang.mywust.data.global.Course;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.data.global.Classroom;
import cn.wustlinghang.mywust.data.global.Course;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

@ -1,8 +1,8 @@
package cn.linghang.mywust.core.parser.graduate;
package cn.wustlinghang.mywust.core.parser.graduate;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.linghang.mywust.data.global.Score;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.data.global.Score;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

@ -1,9 +1,9 @@
package cn.linghang.mywust.core.parser.graduate;
package cn.wustlinghang.mywust.core.parser.graduate;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.linghang.mywust.core.util.JsoupUtil;
import cn.linghang.mywust.data.global.StudentInfo;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.core.util.JsoupUtil;
import cn.wustlinghang.mywust.data.global.StudentInfo;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Element;

@ -1,8 +1,8 @@
package cn.linghang.mywust.core.parser.graduate;
package cn.wustlinghang.mywust.core.parser.graduate;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.linghang.mywust.core.util.JsoupUtil;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.core.util.JsoupUtil;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

@ -1,10 +1,10 @@
package cn.linghang.mywust.core.parser.physics;
package cn.wustlinghang.mywust.core.parser.physics;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.HuangjiahuClassroomNameParser;
import cn.linghang.mywust.core.parser.Parser;
import cn.linghang.mywust.data.global.Classroom;
import cn.linghang.mywust.data.physics.PhysicsCourse;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.HuangjiahuClassroomNameParser;
import cn.wustlinghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.data.global.Classroom;
import cn.wustlinghang.mywust.data.physics.PhysicsCourse;
import org.jsoup.Jsoup;
import org.jsoup.select.Elements;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.parser.physics;
package cn.wustlinghang.mywust.core.parser.physics;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;

@ -1,8 +1,8 @@
package cn.linghang.mywust.core.parser.physics;
package cn.wustlinghang.mywust.core.parser.physics;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.linghang.mywust.core.util.JsoupUtil;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.core.util.JsoupUtil;
import lombok.Data;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

@ -1,9 +1,9 @@
package cn.linghang.mywust.core.parser.physics;
package cn.wustlinghang.mywust.core.parser.physics;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.linghang.mywust.core.util.JsoupUtil;
import cn.linghang.mywust.data.global.Score;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.core.util.JsoupUtil;
import cn.wustlinghang.mywust.data.global.Score;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

@ -1,11 +1,11 @@
package cn.linghang.mywust.core.parser.undergraduate;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.linghang.mywust.core.util.JsoupUtil;
import cn.linghang.mywust.data.global.Classroom;
import cn.linghang.mywust.data.global.Course;
import cn.linghang.mywust.util.StringUtil;
package cn.wustlinghang.mywust.core.parser.undergraduate;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.core.util.JsoupUtil;
import cn.wustlinghang.mywust.data.global.Classroom;
import cn.wustlinghang.mywust.data.global.Course;
import cn.wustlinghang.mywust.util.StringUtil;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.parser.undergraduate;
package cn.wustlinghang.mywust.core.parser.undergraduate;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.parser.undergraduate;
package cn.wustlinghang.mywust.core.parser.undergraduate;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import org.jsoup.Jsoup;
import org.jsoup.select.Elements;

@ -1,9 +1,9 @@
package cn.linghang.mywust.core.parser.undergraduate;
package cn.wustlinghang.mywust.core.parser.undergraduate;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.linghang.mywust.core.util.JsoupUtil;
import cn.linghang.mywust.data.undergrad.ExamDelayApplication;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.core.util.JsoupUtil;
import cn.wustlinghang.mywust.data.undergrad.ExamDelayApplication;
import lombok.extern.slf4j.Slf4j;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Element;

@ -1,9 +1,9 @@
package cn.linghang.mywust.core.parser.undergraduate;
package cn.wustlinghang.mywust.core.parser.undergraduate;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.linghang.mywust.core.util.JsoupUtil;
import cn.linghang.mywust.data.global.Score;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.core.util.JsoupUtil;
import cn.wustlinghang.mywust.data.global.Score;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

@ -1,9 +1,9 @@
package cn.linghang.mywust.core.parser.undergraduate;
package cn.wustlinghang.mywust.core.parser.undergraduate;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.linghang.mywust.core.util.JsoupUtil;
import cn.linghang.mywust.data.global.StudentInfo;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.core.util.JsoupUtil;
import cn.wustlinghang.mywust.data.global.StudentInfo;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.parser.undergraduate;
package cn.wustlinghang.mywust.core.parser.undergraduate;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import org.jsoup.Jsoup;
import org.jsoup.select.Elements;

@ -1,9 +1,9 @@
package cn.linghang.mywust.core.parser.undergraduate.global;
package cn.wustlinghang.mywust.core.parser.undergraduate.global;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.data.global.Classroom;
import cn.linghang.mywust.data.global.Course;
import cn.linghang.mywust.util.StringUtil;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.data.global.Classroom;
import cn.wustlinghang.mywust.data.global.Course;
import cn.wustlinghang.mywust.util.StringUtil;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

@ -1,8 +1,8 @@
package cn.linghang.mywust.core.parser.undergraduate.global;
package cn.wustlinghang.mywust.core.parser.undergraduate.global;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.linghang.mywust.data.global.Course;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.data.global.Course;
import java.util.List;
import java.util.regex.Pattern;

@ -1,8 +1,8 @@
package cn.linghang.mywust.core.parser.undergraduate.global;
package cn.wustlinghang.mywust.core.parser.undergraduate.global;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.linghang.mywust.data.global.Course;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.Parser;
import cn.wustlinghang.mywust.data.global.Course;
import java.util.List;
import java.util.regex.Pattern;

@ -1,6 +1,6 @@
package cn.linghang.mywust.core.request.factory;
package cn.wustlinghang.mywust.core.request.factory;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import java.net.URL;
import java.nio.charset.StandardCharsets;

@ -1,9 +1,9 @@
package cn.linghang.mywust.core.request.factory.auth;
package cn.wustlinghang.mywust.core.request.factory.auth;
import cn.linghang.mywust.core.api.UnionAuthUrls;
import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.util.StringUtil;
import cn.wustlinghang.mywust.core.api.UnionAuthUrls;
import cn.wustlinghang.mywust.core.request.factory.RequestFactory;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.util.StringUtil;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;

@ -1,11 +1,11 @@
package cn.linghang.mywust.core.request.factory.graduate;
import cn.linghang.mywust.captcha.SolvedImageCaptcha;
import cn.linghang.mywust.core.api.GraduateUrls;
import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.core.util.PageFormExtractor;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.util.StringUtil;
package cn.wustlinghang.mywust.core.request.factory.graduate;
import cn.wustlinghang.mywust.captcha.SolvedImageCaptcha;
import cn.wustlinghang.mywust.core.api.GraduateUrls;
import cn.wustlinghang.mywust.core.request.factory.RequestFactory;
import cn.wustlinghang.mywust.core.util.PageFormExtractor;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.util.StringUtil;
import lombok.Builder;
import lombok.Data;

@ -1,10 +1,9 @@
package cn.linghang.mywust.core.request.factory.library;
package cn.wustlinghang.mywust.core.request.factory.library;
import cn.hutool.core.util.URLUtil;
import cn.linghang.mywust.core.api.LibraryUrls;
import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.core.request.factory.library.request.SearchRequest;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.core.api.LibraryUrls;
import cn.wustlinghang.mywust.core.request.factory.RequestFactory;
import cn.wustlinghang.mywust.core.request.factory.library.request.SearchRequest;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.request.factory.library.request;
package cn.wustlinghang.mywust.core.request.factory.library.request;
import lombok.Data;

@ -1,10 +1,10 @@
package cn.linghang.mywust.core.request.factory.physics;
package cn.wustlinghang.mywust.core.request.factory.physics;
import cn.linghang.mywust.core.api.PhysicsSystemUrls;
import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.core.util.PageFormExtractor;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.util.StringUtil;
import cn.wustlinghang.mywust.core.api.PhysicsSystemUrls;
import cn.wustlinghang.mywust.core.request.factory.RequestFactory;
import cn.wustlinghang.mywust.core.util.PageFormExtractor;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.util.StringUtil;
import java.util.HashMap;
import java.util.Map;

@ -1,17 +1,16 @@
package cn.linghang.mywust.core.request.factory.undergrade;
package cn.wustlinghang.mywust.core.request.factory.undergrade;
import cn.linghang.mywust.core.api.UndergradUrls;
import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.data.global.Campus;
import cn.linghang.mywust.network.entitys.FormBodyBuilder;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.util.StringUtil;
import cn.wustlinghang.mywust.core.api.UndergradUrls;
import cn.wustlinghang.mywust.core.request.factory.RequestFactory;
import cn.wustlinghang.mywust.data.global.Campus;
import cn.wustlinghang.mywust.network.entitys.FormBodyBuilder;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.util.StringUtil;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
public class BkjxRequestFactory extends RequestFactory {
public static HttpRequest sessionCookieRequest(String serviceTicket) {

@ -1,11 +1,11 @@
package cn.linghang.mywust.core.request.factory.undergrade.global;
package cn.wustlinghang.mywust.core.request.factory.undergrade.global;
import cn.linghang.mywust.core.api.ConstantParams;
import cn.linghang.mywust.core.api.UndergradUrls;
import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.entitys.FormBodyBuilder;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.core.api.ConstantParams;
import cn.wustlinghang.mywust.core.api.UndergradUrls;
import cn.wustlinghang.mywust.core.request.factory.RequestFactory;
import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.wustlinghang.mywust.network.entitys.FormBodyBuilder;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
public class BkjxAllCourseRequestFactory extends BkjxRequestFactory {
public static HttpRequest classroomCoursePageRequest(String cookies, String term, String timeMode, String collegeId, String campusId, String buildingId, String classroomName) {
@ -54,7 +54,7 @@ public class BkjxAllCourseRequestFactory extends BkjxRequestFactory {
.add("kbjcmsid", timeMode == null ? ConstantParams.DEFAULT_TIME_MODEL : timeMode)
// 上课学院,虽然能获取到,但是不符合预期的功能,得到的结果是这个学院上的课,而不是这个学院开的课
.add("skyx", "")
// 开课学院应该在这里指定,但是直接用学院id是获取不到的,只能用学院下级的id来获取,相关参数详见cn.linghang.mywust.core.api.ConstantParams
// 开课学院应该在这里指定,但是直接用学院id是获取不到的,只能用学院下级的id来获取,相关参数详见cn.wustlinghang.mywust.core.api.ConstantParams
.add("kkyx", subCollegeId)
.add("kcmc", courseName)
.add("zzdKcSX", "")

@ -1,16 +1,16 @@
package cn.linghang.mywust.core.request.service.auth;
import cn.linghang.mywust.captcha.SolvedImageCaptcha;
import cn.linghang.mywust.captcha.UnsolvedImageCaptcha;
import cn.linghang.mywust.core.api.GraduateUrls;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.linghang.mywust.core.request.service.captcha.solver.CaptchaSolver;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
package cn.wustlinghang.mywust.core.request.service.auth;
import cn.wustlinghang.mywust.captcha.SolvedImageCaptcha;
import cn.wustlinghang.mywust.captcha.UnsolvedImageCaptcha;
import cn.wustlinghang.mywust.core.api.GraduateUrls;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.RequestFactory;
import cn.wustlinghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.wustlinghang.mywust.core.request.service.captcha.solver.CaptchaSolver;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import javax.imageio.ImageIO;
import java.awt.*;
@ -49,7 +49,8 @@ public class GraduateLogin {
SolvedImageCaptcha solvedImageCaptcha = captchaSolver.solve(unsolvedImageCaptcha);
// 进行登录
HttpRequest loginRequest = GraduateRequestFactory.loginRequest(username, password, loginIndexResponse.getStringBody(), solvedImageCaptcha);
String loginIndexHtml = loginIndexResponse.getStringBody();
HttpRequest loginRequest = GraduateRequestFactory.loginRequest(username, password, loginIndexHtml, solvedImageCaptcha);
HttpResponse loginResponse = requester.post(loginRequest, option);
// 登陆成功,应该会是302跳转,不是的话多半是认证错误

@ -1,13 +1,13 @@
package cn.linghang.mywust.core.request.service.auth;
import cn.linghang.mywust.core.api.LibraryUrls;
import cn.linghang.mywust.core.api.UnionAuthUrls;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.library.LibraryRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
package cn.wustlinghang.mywust.core.request.service.auth;
import cn.wustlinghang.mywust.core.api.LibraryUrls;
import cn.wustlinghang.mywust.core.api.UnionAuthUrls;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.library.LibraryRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;

@ -1,13 +1,13 @@
package cn.linghang.mywust.core.request.service.auth;
package cn.wustlinghang.mywust.core.request.service.auth;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.physics.PhysicsIndexPageParser;
import cn.linghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.physics.PhysicsIndexPageParser;
import cn.wustlinghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -55,7 +55,7 @@ public class PhysicsLogin {
String redirect = physicsIndexPageParser.parse(indexHtml);
HttpRequest systemIndexRequest = PhysicsSystemRequestFactory.physicsSystemIndexRequest(redirect, loginCookies);
requestClientOption.setFallowUrlRedirect(true);
requestClientOption.setFollowUrlRedirect(true);
HttpResponse response = requester.get(systemIndexRequest, requestClientOption);
if (response.getStatusCode() != HttpResponse.HTTP_OK) {
throw new ApiException(ApiException.Code.COOKIE_INVALID);

@ -1,14 +1,14 @@
package cn.linghang.mywust.core.request.service.auth;
import cn.linghang.mywust.core.api.UndergradUrls;
import cn.linghang.mywust.core.api.UnionAuthUrls;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.linghang.mywust.util.PasswordEncoder;
package cn.wustlinghang.mywust.core.request.service.auth;
import cn.wustlinghang.mywust.core.api.UndergradUrls;
import cn.wustlinghang.mywust.core.api.UnionAuthUrls;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.util.PasswordEncoder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@ -1,12 +1,12 @@
package cn.linghang.mywust.core.request.service.auth;
package cn.wustlinghang.mywust.core.request.service.auth;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.auth.UnionAuthRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.linghang.mywust.util.PasswordEncoder;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.auth.UnionAuthRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.util.PasswordEncoder;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@ -0,0 +1,9 @@
package cn.wustlinghang.mywust.core.request.service.captcha.solver;
import cn.wustlinghang.mywust.captcha.SolvedImageCaptcha;
import cn.wustlinghang.mywust.captcha.UnsolvedImageCaptcha;
import cn.wustlinghang.mywust.exception.ApiException;
public interface CaptchaSolver {
SolvedImageCaptcha solve(UnsolvedImageCaptcha unsolvedImageCaptcha) throws ApiException;
}

@ -1,12 +1,12 @@
package cn.linghang.mywust.core.request.service.captcha.solver;
import cn.linghang.mywust.captcha.SolvedImageCaptcha;
import cn.linghang.mywust.captcha.UnsolvedImageCaptcha;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
package cn.wustlinghang.mywust.core.request.service.captcha.solver;
import cn.wustlinghang.mywust.captcha.SolvedImageCaptcha;
import cn.wustlinghang.mywust.captcha.UnsolvedImageCaptcha;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.RequestFactory;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
import java.util.Base64;

@ -1,14 +1,14 @@
package cn.linghang.mywust.core.request.service.captcha.solver;
import cn.linghang.mywust.captcha.SolvedImageCaptcha;
import cn.linghang.mywust.captcha.UnsolvedImageCaptcha;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.linghang.mywust.util.StringUtil;
package cn.wustlinghang.mywust.core.request.service.captcha.solver;
import cn.wustlinghang.mywust.captcha.SolvedImageCaptcha;
import cn.wustlinghang.mywust.captcha.UnsolvedImageCaptcha;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.RequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.util.StringUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.codec.binary.Base64;

@ -1,12 +1,12 @@
package cn.linghang.mywust.core.request.service.graduate;
import cn.linghang.mywust.core.api.GraduateUrls;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
package cn.wustlinghang.mywust.core.request.service.graduate;
import cn.wustlinghang.mywust.core.api.GraduateUrls;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.RequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;

@ -1,11 +1,11 @@
package cn.linghang.mywust.core.request.service.graduate;
package cn.wustlinghang.mywust.core.request.service.graduate;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
@ -23,6 +23,6 @@ public class GraduateCourseTableApiService extends GraduateApiServiceBase {
HttpResponse response = requester.get(request, option);
super.checkResponse(response);
return new String(response.getBody());
return response.getStringBody();
}
}

@ -1,11 +1,11 @@
package cn.linghang.mywust.core.request.service.graduate;
package cn.wustlinghang.mywust.core.request.service.graduate;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
@ -22,6 +22,6 @@ public class GraduateScoreApiService extends GraduateApiServiceBase {
HttpResponse response = requester.get(request, option);
super.checkResponse(response);
return new String(response.getBody());
return response.getStringBody();
}
}

@ -1,11 +1,11 @@
package cn.linghang.mywust.core.request.service.graduate;
package cn.wustlinghang.mywust.core.request.service.graduate;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
@ -22,6 +22,6 @@ public class GraduateStudentInfoApiService extends GraduateApiServiceBase {
HttpResponse response = requester.get(request, option);
super.checkResponse(response);
return new String(response.getBody());
return response.getStringBody();
}
}

@ -1,11 +1,11 @@
package cn.linghang.mywust.core.request.service.graduate;
package cn.wustlinghang.mywust.core.request.service.graduate;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
@ -22,6 +22,6 @@ public class GraduateTrainingPlanApiService extends GraduateApiServiceBase {
HttpResponse response = requester.get(request, option);
super.checkResponse(response);
return new String(response.getBody());
return response.getStringBody();
}
}

@ -1,10 +1,10 @@
package cn.linghang.mywust.core.request.service.library;
package cn.wustlinghang.mywust.core.request.service.library;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.library.LibraryRequestFactory;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.library.LibraryRequestFactory;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;

@ -1,8 +1,8 @@
package cn.linghang.mywust.core.request.service.library;
package cn.wustlinghang.mywust.core.request.service.library;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
public abstract class LibraryApiServiceBase {
protected final Requester requester;

@ -1,8 +1,8 @@
package cn.linghang.mywust.core.request.service.physics;
package cn.wustlinghang.mywust.core.request.service.physics;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
public abstract class PhysicsApiServiceBase {
protected final Requester requester;

@ -1,11 +1,11 @@
package cn.linghang.mywust.core.request.service.physics;
package cn.wustlinghang.mywust.core.request.service.physics;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
@ -15,7 +15,7 @@ public class PhysicsCourseApiService extends PhysicsApiServiceBase {
}
public String getPage(String cookie, RequestClientOption requestClientOption) throws IOException, ApiException {
requestClientOption.setFallowUrlRedirect(false);
requestClientOption.setFollowUrlRedirect(false);
// 直接请求真正的课表页
HttpRequest coursePageRequest = PhysicsSystemRequestFactory.physicsCourseRequest(cookie);

@ -1,14 +1,14 @@
package cn.linghang.mywust.core.request.service.physics;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.physics.PhysicsScoreListPageParser;
import cn.linghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory;
import cn.linghang.mywust.core.util.PageFormExtractor;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
package cn.wustlinghang.mywust.core.request.service.physics;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.physics.PhysicsScoreListPageParser;
import cn.wustlinghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory;
import cn.wustlinghang.mywust.core.util.PageFormExtractor;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
import java.util.ArrayList;

@ -1,13 +1,13 @@
package cn.linghang.mywust.core.request.service.undergraduate;
import cn.linghang.mywust.core.api.UndergradUrls;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.core.util.BkjxUtil;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
package cn.wustlinghang.mywust.core.request.service.undergraduate;
import cn.wustlinghang.mywust.core.api.UndergradUrls;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.RequestFactory;
import cn.wustlinghang.mywust.core.util.BkjxUtil;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
import java.util.Map;

@ -1,11 +1,11 @@
package cn.linghang.mywust.core.request.service.undergraduate;
package cn.wustlinghang.mywust.core.request.service.undergraduate;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
import java.util.Map;
@ -40,7 +40,7 @@ public class UndergradCourseTableApiService extends UndergradApiServiceBase {
super.checkResponse(response);
return new String(response.getBody());
return response.getStringBody();
}
public String getPage(String term, String cookies) throws IOException, ApiException {

@ -1,13 +1,13 @@
package cn.linghang.mywust.core.request.service.undergraduate;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.exception.ParseException;
import cn.linghang.mywust.core.parser.undergraduate.UndergradCreditStatusIndexParser;
import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
package cn.wustlinghang.mywust.core.request.service.undergraduate;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.exception.ParseException;
import cn.wustlinghang.mywust.core.parser.undergraduate.UndergradCreditStatusIndexParser;
import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
import java.util.Map;

@ -1,11 +1,11 @@
package cn.linghang.mywust.core.request.service.undergraduate;
package cn.wustlinghang.mywust.core.request.service.undergraduate;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.AllArgsConstructor;

@ -1,11 +1,11 @@
package cn.linghang.mywust.core.request.service.undergraduate;
package cn.wustlinghang.mywust.core.request.service.undergraduate;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
import java.util.Map;
@ -32,7 +32,7 @@ public class UndergradScoreApiService extends UndergradApiServiceBase {
super.checkResponse(response);
return new String(response.getBody());
return response.getStringBody();
}
public String getPage(String cookies) throws IOException, ApiException {

@ -1,11 +1,11 @@
package cn.linghang.mywust.core.request.service.undergraduate;
package cn.wustlinghang.mywust.core.request.service.undergraduate;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
import java.util.Map;
@ -32,7 +32,7 @@ public class UndergradStudentInfoApiService extends UndergradApiServiceBase {
super.checkResponse(response);
return new String(response.getBody());
return response.getStringBody();
}
public String getPage(String cookies) throws IOException, ApiException {

@ -1,11 +1,11 @@
package cn.linghang.mywust.core.request.service.undergraduate;
package cn.wustlinghang.mywust.core.request.service.undergraduate;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
import java.util.Map;
@ -32,7 +32,7 @@ public class UndergradTrainingPlanApiService extends UndergradApiServiceBase {
super.checkResponse(response);
return new String(response.getBody());
return response.getStringBody();
}
public String getPage(String cookies) throws IOException, ApiException {

@ -1,12 +1,12 @@
package cn.linghang.mywust.core.request.service.undergraduate.global;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory;
import cn.linghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
package cn.wustlinghang.mywust.core.request.service.undergraduate.global;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory;
import cn.wustlinghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
import java.util.Map;

@ -1,15 +1,15 @@
package cn.linghang.mywust.core.request.service.undergraduate.global;
import cn.linghang.mywust.core.api.ConstantParams;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase;
import cn.linghang.mywust.data.global.Building;
import cn.linghang.mywust.data.global.Campus;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
package cn.wustlinghang.mywust.core.request.service.undergraduate.global;
import cn.wustlinghang.mywust.core.api.ConstantParams;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.wustlinghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase;
import cn.wustlinghang.mywust.data.global.Building;
import cn.wustlinghang.mywust.data.global.Campus;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;

@ -1,12 +1,12 @@
package cn.linghang.mywust.core.request.service.undergraduate.global;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory;
import cn.linghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
package cn.wustlinghang.mywust.core.request.service.undergraduate.global;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory;
import cn.wustlinghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
import java.util.Map;

@ -1,12 +1,12 @@
package cn.linghang.mywust.core.request.service.undergraduate.global;
import cn.linghang.mywust.exception.ApiException;
import cn.linghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory;
import cn.linghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
package cn.wustlinghang.mywust.core.request.service.undergraduate.global;
import cn.wustlinghang.mywust.exception.ApiException;
import cn.wustlinghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory;
import cn.wustlinghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;
import java.util.Map;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.util;
package cn.wustlinghang.mywust.core.util;
import java.nio.charset.StandardCharsets;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.util;
package cn.wustlinghang.mywust.core.util;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.util;
package cn.wustlinghang.mywust.core.util;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>mywust</artifactId>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<version>${revision}</version>
</parent>
<artifactId>mywust-network-httpclient</artifactId>

@ -5,7 +5,7 @@
<parent>
<artifactId>mywust</artifactId>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -34,12 +34,12 @@
</dependency>
<dependency>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<artifactId>mywust-network</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<artifactId>mywust-util</artifactId>
<version>${project.parent.version}</version>
<scope>compile</scope>

@ -1,4 +1,4 @@
package cn.linghang.mywust.network.okhttp;
package cn.wustlinghang.mywust.network.okhttp;
import okhttp3.Interceptor;
import okhttp3.Response;

@ -1,10 +1,10 @@
package cn.linghang.mywust.network.okhttp;
package cn.wustlinghang.mywust.network.okhttp;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.linghang.mywust.util.StringUtil;
import cn.wustlinghang.mywust.network.RequestClientOption;
import cn.wustlinghang.mywust.network.Requester;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.util.StringUtil;
import okhttp3.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -149,7 +149,7 @@ public class SimpleOkhttpRequester implements Requester {
builder.callTimeout(requestClientOption.getTimeout(), TimeUnit.SECONDS)
.readTimeout(requestClientOption.getTimeout(), TimeUnit.SECONDS)
.connectTimeout(requestClientOption.getTimeout(), TimeUnit.SECONDS)
.followRedirects(requestClientOption.isFallowUrlRedirect())
.followRedirects(requestClientOption.isFollowUrlRedirect())
.addInterceptor(new RedirectInterceptor());
// 是否忽略SSL错误

@ -1,4 +1,4 @@
package cn.linghang.mywust.network.okhttp;
package cn.wustlinghang.mywust.network.okhttp;
import javax.net.ssl.*;
import java.security.KeyStore;

@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>mywust</artifactId>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -19,7 +19,7 @@
<dependencies>
<dependency>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<artifactId>mywust-util</artifactId>
<version>${project.parent.version}</version>
<scope>compile</scope>

@ -1,4 +1,4 @@
package cn.linghang.mywust.network;
package cn.wustlinghang.mywust.network;
import lombok.Builder;
import lombok.Data;
@ -7,7 +7,7 @@ import lombok.Data;
public class RequestClientOption {
private Proxy proxy;
private long timeout;
private boolean fallowUrlRedirect;
private boolean followUrlRedirect;
private boolean ignoreSSLError;
@ -21,14 +21,14 @@ public class RequestClientOption {
public RequestClientOption() {
this.proxy = null;
this.timeout = 5;
this.fallowUrlRedirect = false;
this.followUrlRedirect = false;
this.ignoreSSLError = true;
}
public RequestClientOption(Proxy proxy, long timeout, boolean fallowUrlRedirect, boolean ignoreSSLError) {
public RequestClientOption(Proxy proxy, long timeout, boolean followUrlRedirect, boolean ignoreSSLError) {
this.proxy = proxy;
this.timeout = timeout;
this.fallowUrlRedirect = fallowUrlRedirect;
this.followUrlRedirect = followUrlRedirect;
this.ignoreSSLError = ignoreSSLError;
}
@ -53,8 +53,8 @@ public class RequestClientOption {
}
@Override
public boolean isFallowUrlRedirect() {
return super.isFallowUrlRedirect();
public boolean isFollowUrlRedirect() {
return super.isFollowUrlRedirect();
}
@Override
@ -64,7 +64,7 @@ public class RequestClientOption {
public void setTimeout(long timeout) {}
@Override
public void setFallowUrlRedirect(boolean fallowUrlRedirect) {}
public void setFollowUrlRedirect(boolean followUrlRedirect) {}
}
public static RequestClientOptionBuilder builder() {
@ -89,7 +89,7 @@ public class RequestClientOption {
}
public RequestClientOptionBuilder fallowUrlRedirect(boolean fallowUrlRedirect) {
requestClientOption.setFallowUrlRedirect(fallowUrlRedirect);
requestClientOption.setFollowUrlRedirect(fallowUrlRedirect);
return this;
}

@ -1,7 +1,7 @@
package cn.linghang.mywust.network;
package cn.wustlinghang.mywust.network;
import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse;
import cn.wustlinghang.mywust.network.entitys.HttpRequest;
import cn.wustlinghang.mywust.network.entitys.HttpResponse;
import java.io.IOException;

@ -1,7 +1,7 @@
package cn.linghang.mywust.network.entitys;
package cn.wustlinghang.mywust.network.entitys;
import cn.linghang.mywust.util.RepeatableComparator;
import cn.linghang.mywust.util.StringUtil;
import cn.wustlinghang.mywust.util.RepeatableComparator;
import cn.wustlinghang.mywust.util.StringUtil;
import java.util.Comparator;
import java.util.HashMap;

@ -1,4 +1,4 @@
package cn.linghang.mywust.network.entitys;
package cn.wustlinghang.mywust.network.entitys;
import lombok.Builder;
import lombok.Data;

@ -1,10 +1,11 @@
package cn.linghang.mywust.network.entitys;
package cn.wustlinghang.mywust.network.entitys;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Map;
@ -34,7 +35,11 @@ public class HttpResponse {
private byte[] body;
public String getStringBody() {
return new String(body);
return new String(body, StandardCharsets.UTF_8);
}
public String getStringBody(Charset charsets) {
return new String(body, charsets);
}
public void setBody(byte[] body) {

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<artifactId>mywust</artifactId>
<version>${revision}</version>
</parent>
@ -14,13 +14,13 @@
<dependencies>
<dependency>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<artifactId>mywust-core</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<artifactId>mywust-network-okhttp</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>

@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>mywust</artifactId>
<groupId>cn.linghang</groupId>
<groupId>cn.wustlinghang.mywust</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>

@ -1,4 +1,4 @@
package cn.linghang.mywust.util;
package cn.wustlinghang.mywust.util;
import org.apache.commons.codec.binary.Hex;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save