add - PushAgent XBiubiu6690

This commit is contained in:
yangqiang3504
2022-09-01 15:58:51 +08:00
parent 12e86815fb
commit 1762ee80fa
2 changed files with 5 additions and 13 deletions
@@ -2,12 +2,13 @@ package com.github.catvod.spider;
import android.content.Context;
import android.text.TextUtils;
import com.github.catvod.crawler.Spider;
import com.github.catvod.crawler.SpiderDebug;
import com.github.catvod.utils.okhttp.OKCallBack;
import com.github.catvod.utils.okhttp.OkHttpUtil;
import okhttp3.Call;
import okhttp3.Cookie;
import okhttp3.Response;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -17,19 +18,9 @@ import org.jsoup.nodes.Document;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.Iterator;
import java.util.List;
import okhttp3.Call;
import okhttp3.Cookie;
import okhttp3.CookieJar;
import okhttp3.HttpUrl;
import okhttp3.OkHttpClient;
import okhttp3.Response;
public class Bili extends Spider {
protected JSONObject ext = null;
@@ -216,7 +216,7 @@ public class PushAgent extends Spider {
}
private static void refreshTk() {
private void refreshTk() {
long b = Time();
String str = j;
if (str.isEmpty() || StopRefresh - b <= 600) {
@@ -236,6 +236,7 @@ public class PushAgent extends Spider {
long j2 = jSONObject3.getLong("expires_in");
StopRefresh = b + j2;
} catch (Exception e) {
fetchRule(false,0);
SpiderDebug.log(e);
}
}