jinxia.mo пре 3 година
родитељ
комит
8dc8d07409

+ 11 - 0
src/main/java/com/mingxue/spider/utils/ApiUtil.java

@@ -108,6 +108,17 @@ public class ApiUtil {
                 String token = data.getString("accessToken");
                 requestBuilder.addHeader("accessToken", token);
                 this.user.setProvinceId(provinceId).setToken(token);
+                Integer utype = data.getInteger("utype");
+                if(utype!=8){
+                    log.error("user is not valid: {}",JSONObject.toJSONString(user));
+                    //全能卡用户
+                    return false;
+                }
+                if(utype==1){
+                    //普通用户
+                    return false;
+                }
+
                 return true;
             } else {
                 System.out.println(res);

+ 1 - 1
src/test/java/spider/CollegeData.java

@@ -47,7 +47,7 @@ public class CollegeData {
     }
 
     public void collegeList() throws SQLException {
-        int count = 0, total = 5000, page = 74;
+        int count = 0, total = 5000, page = 116;
         JSONObject res=new JSONObject();
         do {
             try {