add - 详情页自动查询集合

This commit is contained in:
yangqiang3504
2022-08-24 11:38:02 +08:00
parent b10bc32f89
commit c77682419c
3 changed files with 90 additions and 28 deletions
@@ -43,6 +43,22 @@ public class Misc {
return false;
}
public static JSONObject jHeaders(int type,String url) {
JSONObject headers = new JSONObject();
try {
if(type==0){
headers.put("User-Agent", UaWinChrome);
}else headers.put("User-Agent", MoAgent);
headers.put("Connection", " Keep-Alive");
if (url != null) {
headers.put("Referer", " " +url);
}
} catch (JSONException e) {
}
return headers;
}
public static HashMap<String, String> Headers(int type,String url) {
HashMap<String, String> headers = new HashMap<>();
if(type==0){
@@ -51,7 +67,7 @@ public class Misc {
headers.put("Connection", " Keep-Alive");
if (url != null) {
headers.put("Referer", url);
headers.put("Referer", " " +url);
}
return headers;
}