移动部分service包到request包下,原request包下的内容移至request.factory下

old-package
lensfrex 2 years ago
parent d9a7467e70
commit 71264e9ac3
Signed by: lensfrex
GPG Key ID: 0F69A0A2FBEE98A0
  1. 2
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/RequestFactory.java
  2. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/auth/UnionAuthRequestFactory.java
  3. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/graduate/GraduateRequestFactory.java
  4. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/library/LibraryRequestFactory.java
  5. 2
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/library/response/BaseInfo.java
  6. 2
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/library/response/DetailInfo.java
  7. 2
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/library/response/ExtraInfo.java
  8. 2
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/library/response/LoanResultItem.java
  9. 2
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/library/response/Map.java
  10. 2
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/library/response/Response.java
  11. 2
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/library/response/SearchResultItem.java
  12. 5
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/physics/PhysicsSystemRequestFactory.java
  13. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/undergrade/BkjxRequestFactory.java
  14. 2
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/undergrade/CourseTableRequestParamFactory.java
  15. 11
      mywust-core/src/main/java/cn/linghang/mywust/core/request/factory/undergrade/global/BkjxAllCourseRequestFactory.java
  16. 8
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/GraduateLogin.java
  17. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/LibraryLogin.java
  18. 5
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/PhysicsLogin.java
  19. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/UndergraduateLogin.java
  20. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/auth/UnionLogin.java
  21. 2
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/captcha/solver/CaptchaSolver.java
  22. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/captcha/solver/DdddOcrCaptchaSolver.java
  23. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/captcha/solver/LinghangOcrServiceCaptchaSolver.java
  24. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateApiServiceBase.java
  25. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateCourseTableApiService.java
  26. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateScoreApiService.java
  27. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateStudentInfoApiService.java
  28. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/graduate/GraduateTrainingPlanApiService.java
  29. 2
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/physics/PhysicsApiServiceBase.java
  30. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/physics/PhysicsCourseApiServiceBase.java
  31. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/physics/PhysicsScoreApiServiceBase.java
  32. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradApiServiceBase.java
  33. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradCourseTableApiService.java
  34. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradCreditStatusApiService.java
  35. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradExamDelayApiService.java
  36. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradScoreApiService.java
  37. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradStudentInfoApiService.java
  38. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/UndergradTrainingPlanApiService.java
  39. 6
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradAllCourseScheduleApiService.java
  40. 6
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradBuildingIdApiService.java
  41. 6
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradClassroomCourseApiService.java
  42. 6
      mywust-core/src/main/java/cn/linghang/mywust/core/request/service/undergraduate/global/UndergradTeacherCourseApiService.java
  43. 4
      mywust-core/src/main/java/cn/linghang/mywust/core/service/library/LibraryApiService.java
  44. 19
      mywust-test/pom.xml
  45. 51
      mywust-test/src/test/java/ParseTest.java
  46. 8
      pom.xml

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.request; package cn.linghang.mywust.core.request.factory;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.request.auth; package cn.linghang.mywust.core.request.factory.auth;
import cn.linghang.mywust.core.api.UnionAuthUrls; import cn.linghang.mywust.core.api.UnionAuthUrls;
import cn.linghang.mywust.core.request.RequestFactory; import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.util.StringUtil; import cn.linghang.mywust.util.StringUtil;

@ -1,8 +1,8 @@
package cn.linghang.mywust.core.request.graduate; package cn.linghang.mywust.core.request.factory.graduate;
import cn.linghang.mywust.captcha.SolvedImageCaptcha; import cn.linghang.mywust.captcha.SolvedImageCaptcha;
import cn.linghang.mywust.core.api.GraduateUrls; import cn.linghang.mywust.core.api.GraduateUrls;
import cn.linghang.mywust.core.request.RequestFactory; import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.util.StringUtil; import cn.linghang.mywust.util.StringUtil;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.request.library; package cn.linghang.mywust.core.request.factory.library;
import cn.linghang.mywust.core.api.LibraryUrls; import cn.linghang.mywust.core.api.LibraryUrls;
import cn.linghang.mywust.core.request.RequestFactory; import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;
public class LibraryRequestFactory extends RequestFactory { public class LibraryRequestFactory extends RequestFactory {

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.request.library.response; package cn.linghang.mywust.core.request.factory.library.response;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.request.library.response; package cn.linghang.mywust.core.request.factory.library.response;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.request.library.response; package cn.linghang.mywust.core.request.factory.library.response;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.request.library.response; package cn.linghang.mywust.core.request.factory.library.response;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.request.library.response; package cn.linghang.mywust.core.request.factory.library.response;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.request.library.response; package cn.linghang.mywust.core.request.factory.library.response;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.request.library.response; package cn.linghang.mywust.core.request.factory.library.response;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;

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

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.request.undergrade; package cn.linghang.mywust.core.request.factory.undergrade;
import cn.linghang.mywust.core.api.UndergradUrls; import cn.linghang.mywust.core.api.UndergradUrls;
import cn.linghang.mywust.core.request.RequestFactory; import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.data.global.Campus; import cn.linghang.mywust.data.global.Campus;
import cn.linghang.mywust.network.entitys.FormBodyBuilder; import cn.linghang.mywust.network.entitys.FormBodyBuilder;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.request.undergrade; package cn.linghang.mywust.core.request.factory.undergrade;
import cn.linghang.mywust.network.entitys.FormBodyBuilder; import cn.linghang.mywust.network.entitys.FormBodyBuilder;

@ -1,8 +1,9 @@
package cn.linghang.mywust.core.request.undergrade.global; package cn.linghang.mywust.core.request.factory.undergrade.global;
import cn.linghang.mywust.core.api.ConstantParams; import cn.linghang.mywust.core.api.ConstantParams;
import cn.linghang.mywust.core.api.UndergradUrls; import cn.linghang.mywust.core.api.UndergradUrls;
import cn.linghang.mywust.core.request.undergrade.BkjxRequestFactory; 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.FormBodyBuilder;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;
@ -25,7 +26,7 @@ public class BkjxAllCourseRequestFactory extends BkjxRequestFactory {
.add("jc1", "") .add("jc1", "")
.add("jc2", ""); .add("jc2", "");
return makeStringDataHttpRequest(UndergradUrls.BKJX_CLASSROOM_COURSE_API, formBodyBuilder.buildAndToString(), cookies); return RequestFactory.makeStringDataHttpRequest(UndergradUrls.BKJX_CLASSROOM_COURSE_API, formBodyBuilder.buildAndToString(), cookies);
} }
public static HttpRequest teacherCoursePageRequest(String cookies, String term, String timeMode, String collegeId, String teacherName) { public static HttpRequest teacherCoursePageRequest(String cookies, String term, String timeMode, String collegeId, String teacherName) {
@ -43,7 +44,7 @@ public class BkjxAllCourseRequestFactory extends BkjxRequestFactory {
.add("jc1", "") .add("jc1", "")
.add("jc2", ""); .add("jc2", "");
return makeStringDataHttpRequest(UndergradUrls.BKJX_TEACHER_COURSE_API, formBodyBuilder.buildAndToString(), cookies); return RequestFactory.makeStringDataHttpRequest(UndergradUrls.BKJX_TEACHER_COURSE_API, formBodyBuilder.buildAndToString(), cookies);
} }
public static HttpRequest allCourseSchedulePageRequest(String cookies, String term, String timeMode, String subCollegeId, String courseName) { public static HttpRequest allCourseSchedulePageRequest(String cookies, String term, String timeMode, String subCollegeId, String courseName) {
@ -67,6 +68,6 @@ public class BkjxAllCourseRequestFactory extends BkjxRequestFactory {
.add("jc1", "") .add("jc1", "")
.add("jc2", ""); .add("jc2", "");
return makeStringDataHttpRequest(UndergradUrls.BKJX_ALL_COURSE_SCHEDULE_API, formBodyBuilder.buildAndToString(), cookies); return RequestFactory.makeStringDataHttpRequest(UndergradUrls.BKJX_ALL_COURSE_SCHEDULE_API, formBodyBuilder.buildAndToString(), cookies);
} }
} }

@ -1,12 +1,12 @@
package cn.linghang.mywust.core.service.auth; package cn.linghang.mywust.core.request.service.auth;
import cn.linghang.mywust.captcha.SolvedImageCaptcha; import cn.linghang.mywust.captcha.SolvedImageCaptcha;
import cn.linghang.mywust.captcha.UnsolvedImageCaptcha; import cn.linghang.mywust.captcha.UnsolvedImageCaptcha;
import cn.linghang.mywust.core.api.GraduateUrls; import cn.linghang.mywust.core.api.GraduateUrls;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.RequestFactory; import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.core.request.graduate.GraduateRequestFactory; import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.linghang.mywust.core.service.captcha.solver.CaptchaSolver; import cn.linghang.mywust.core.request.service.captcha.solver.CaptchaSolver;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

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

@ -1,10 +1,9 @@
package cn.linghang.mywust.core.service.auth; package cn.linghang.mywust.core.request.service.auth;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.exception.BasicException;
import cn.linghang.mywust.core.exception.ParseException; import cn.linghang.mywust.core.exception.ParseException;
import cn.linghang.mywust.core.parser.physics.PhysicsIndexPageParser; import cn.linghang.mywust.core.parser.physics.PhysicsIndexPageParser;
import cn.linghang.mywust.core.request.physics.PhysicsSystemRequestFactory; import cn.linghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,9 +1,9 @@
package cn.linghang.mywust.core.service.auth; package cn.linghang.mywust.core.request.service.auth;
import cn.linghang.mywust.core.api.UndergradUrls; import cn.linghang.mywust.core.api.UndergradUrls;
import cn.linghang.mywust.core.api.UnionAuthUrls; import cn.linghang.mywust.core.api.UnionAuthUrls;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.undergrade.BkjxRequestFactory; import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.service.auth; package cn.linghang.mywust.core.request.service.auth;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.auth.UnionAuthRequestFactory; import cn.linghang.mywust.core.request.factory.auth.UnionAuthRequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.service.captcha.solver; package cn.linghang.mywust.core.request.service.captcha.solver;
import cn.linghang.mywust.captcha.SolvedImageCaptcha; import cn.linghang.mywust.captcha.SolvedImageCaptcha;
import cn.linghang.mywust.captcha.UnsolvedImageCaptcha; import cn.linghang.mywust.captcha.UnsolvedImageCaptcha;

@ -1,9 +1,9 @@
package cn.linghang.mywust.core.service.captcha.solver; package cn.linghang.mywust.core.request.service.captcha.solver;
import cn.linghang.mywust.captcha.SolvedImageCaptcha; import cn.linghang.mywust.captcha.SolvedImageCaptcha;
import cn.linghang.mywust.captcha.UnsolvedImageCaptcha; import cn.linghang.mywust.captcha.UnsolvedImageCaptcha;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.RequestFactory; import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;
import cn.linghang.mywust.network.entitys.HttpResponse; import cn.linghang.mywust.network.entitys.HttpResponse;

@ -1,9 +1,9 @@
package cn.linghang.mywust.core.service.captcha.solver; package cn.linghang.mywust.core.request.service.captcha.solver;
import cn.linghang.mywust.captcha.SolvedImageCaptcha; import cn.linghang.mywust.captcha.SolvedImageCaptcha;
import cn.linghang.mywust.captcha.UnsolvedImageCaptcha; import cn.linghang.mywust.captcha.UnsolvedImageCaptcha;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.RequestFactory; import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,8 +1,8 @@
package cn.linghang.mywust.core.service.graduate; package cn.linghang.mywust.core.request.service.graduate;
import cn.linghang.mywust.core.api.GraduateUrls; import cn.linghang.mywust.core.api.GraduateUrls;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.RequestFactory; import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.service.graduate; package cn.linghang.mywust.core.request.service.graduate;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.graduate.GraduateRequestFactory; import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.service.graduate; package cn.linghang.mywust.core.request.service.graduate;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.graduate.GraduateRequestFactory; import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.service.graduate; package cn.linghang.mywust.core.request.service.graduate;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.graduate.GraduateRequestFactory; import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.service.graduate; package cn.linghang.mywust.core.request.service.graduate;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.graduate.GraduateRequestFactory; import cn.linghang.mywust.core.request.factory.graduate.GraduateRequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,4 +1,4 @@
package cn.linghang.mywust.core.service.physics; package cn.linghang.mywust.core.request.service.physics;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.service.physics; package cn.linghang.mywust.core.request.service.physics;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.physics.PhysicsSystemRequestFactory; import cn.linghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,9 +1,9 @@
package cn.linghang.mywust.core.service.physics; package cn.linghang.mywust.core.request.service.physics;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.exception.ParseException; import cn.linghang.mywust.core.exception.ParseException;
import cn.linghang.mywust.core.parser.physics.PhysicsScoreListPageParser; import cn.linghang.mywust.core.parser.physics.PhysicsScoreListPageParser;
import cn.linghang.mywust.core.request.physics.PhysicsSystemRequestFactory; import cn.linghang.mywust.core.request.factory.physics.PhysicsSystemRequestFactory;
import cn.linghang.mywust.core.util.PageFormExtractor; import cn.linghang.mywust.core.util.PageFormExtractor;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;

@ -1,8 +1,8 @@
package cn.linghang.mywust.core.service.undergraduate; package cn.linghang.mywust.core.request.service.undergraduate;
import cn.linghang.mywust.core.api.UndergradUrls; import cn.linghang.mywust.core.api.UndergradUrls;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.RequestFactory; import cn.linghang.mywust.core.request.factory.RequestFactory;
import cn.linghang.mywust.core.util.BkjxUtil; import cn.linghang.mywust.core.util.BkjxUtil;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.service.undergraduate; package cn.linghang.mywust.core.request.service.undergraduate;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.undergrade.BkjxRequestFactory; import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,9 +1,9 @@
package cn.linghang.mywust.core.service.undergraduate; package cn.linghang.mywust.core.request.service.undergraduate;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.exception.ParseException; import cn.linghang.mywust.core.exception.ParseException;
import cn.linghang.mywust.core.parser.undergraduate.UndergradCreditStatusIndexParser; import cn.linghang.mywust.core.parser.undergraduate.UndergradCreditStatusIndexParser;
import cn.linghang.mywust.core.request.undergrade.BkjxRequestFactory; import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.service.undergraduate; package cn.linghang.mywust.core.request.service.undergraduate;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.undergrade.BkjxRequestFactory; import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.service.undergraduate; package cn.linghang.mywust.core.request.service.undergraduate;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.undergrade.BkjxRequestFactory; import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.service.undergraduate; package cn.linghang.mywust.core.request.service.undergraduate;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.undergrade.BkjxRequestFactory; import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,7 +1,7 @@
package cn.linghang.mywust.core.service.undergraduate; package cn.linghang.mywust.core.request.service.undergraduate;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.undergrade.BkjxRequestFactory; import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,8 +1,8 @@
package cn.linghang.mywust.core.service.undergraduate.global; package cn.linghang.mywust.core.request.service.undergraduate.global;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.undergrade.global.BkjxAllCourseRequestFactory; import cn.linghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory;
import cn.linghang.mywust.core.service.undergraduate.UndergradApiServiceBase; import cn.linghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,9 +1,9 @@
package cn.linghang.mywust.core.service.undergraduate.global; package cn.linghang.mywust.core.request.service.undergraduate.global;
import cn.linghang.mywust.core.api.ConstantParams; import cn.linghang.mywust.core.api.ConstantParams;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.undergrade.BkjxRequestFactory; import cn.linghang.mywust.core.request.factory.undergrade.BkjxRequestFactory;
import cn.linghang.mywust.core.service.undergraduate.UndergradApiServiceBase; import cn.linghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase;
import cn.linghang.mywust.data.global.Building; import cn.linghang.mywust.data.global.Building;
import cn.linghang.mywust.data.global.Campus; import cn.linghang.mywust.data.global.Campus;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;

@ -1,8 +1,8 @@
package cn.linghang.mywust.core.service.undergraduate.global; package cn.linghang.mywust.core.request.service.undergraduate.global;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.undergrade.global.BkjxAllCourseRequestFactory; import cn.linghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory;
import cn.linghang.mywust.core.service.undergraduate.UndergradApiServiceBase; import cn.linghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,8 +1,8 @@
package cn.linghang.mywust.core.service.undergraduate.global; package cn.linghang.mywust.core.request.service.undergraduate.global;
import cn.linghang.mywust.core.exception.ApiException; import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.request.undergrade.global.BkjxAllCourseRequestFactory; import cn.linghang.mywust.core.request.factory.undergrade.global.BkjxAllCourseRequestFactory;
import cn.linghang.mywust.core.service.undergraduate.UndergradApiServiceBase; import cn.linghang.mywust.core.request.service.undergraduate.UndergradApiServiceBase;
import cn.linghang.mywust.network.RequestClientOption; import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester; import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.entitys.HttpRequest; import cn.linghang.mywust.network.entitys.HttpRequest;

@ -1,4 +0,0 @@
package cn.linghang.mywust.core.service.library;
public class LibraryApiService {
}

@ -61,13 +61,6 @@
<version>RELEASE</version> <version>RELEASE</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>cn.linghang</groupId>
<artifactId>mywust-core</artifactId>
<version>0.0.2-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
<properties> <properties>
@ -76,4 +69,16 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project> </project>

@ -1,51 +0,0 @@
import cn.linghang.mywust.core.exception.ApiException;
import cn.linghang.mywust.core.exception.ParseException;
import cn.linghang.mywust.core.parser.Parser;
import cn.linghang.mywust.core.parser.physics.PhysicsCoursePageParser;
import cn.linghang.mywust.core.parser.undergraduate.UndergradCreditStatusParser;
import cn.linghang.mywust.core.parser.undergraduate.UndergradExamDelayParser;
import cn.linghang.mywust.core.service.auth.PhysicsLogin;
import cn.linghang.mywust.core.service.auth.UndergraduateLogin;
import cn.linghang.mywust.core.service.physics.PhysicsApiService;
import cn.linghang.mywust.core.service.undergraduate.UndergradCreditStatusApiService;
import cn.linghang.mywust.core.service.undergraduate.UndergradExamDelayApiService;
import cn.linghang.mywust.model.global.Course;
import cn.linghang.mywust.model.physics.PhysicsCourse;
import cn.linghang.mywust.model.undergrad.ExamDelayApplication;
import cn.linghang.mywust.network.RequestClientOption;
import cn.linghang.mywust.network.Requester;
import cn.linghang.mywust.network.okhttp.SimpleOkhttpRequester;
import org.jsoup.Jsoup;
import java.io.IOException;
import java.util.List;
import java.util.Scanner;
public class ParseTest {
public static void main(String[] args) throws IOException, ParseException, ApiException {
// Scanner scanner = new Scanner(System.in);
//
// String cookie = scanner.nextLine();
//
// System.out.println("Cookie:" + cookie);
//
// Requester requester = new SimpleOkhttpRequester();
// UndergradExamDelayApiService service = new UndergradExamDelayApiService(requester);
//
// RequestClientOption option = new RequestClientOption();
// RequestClientOption.Proxy proxy = RequestClientOption.Proxy.builder().build();
// proxy.setAddress("127.0.0.1");
// proxy.setPort(8080);
// option.setProxy(proxy);
//
// String data = service.getPage("2022-2023-1", "9FF84C58B1CA4BDBB656E4C224B617A9", cookie, option);
// System.out.println(data);
String html = Jsoup.connect("http://localhost/xf.html").get().toString();
UndergradCreditStatusParser parser = new UndergradCreditStatusParser();
String result = parser.parse(html);
System.out.println(result);
}
}

@ -48,6 +48,7 @@
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
@ -61,6 +62,13 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId> <artifactId>flatten-maven-plugin</artifactId>

Loading…
Cancel
Save