add - PushAgent XBiubiu6690
This commit is contained in:
@@ -2,12 +2,13 @@ package com.github.catvod.spider;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.github.catvod.crawler.Spider;
|
import com.github.catvod.crawler.Spider;
|
||||||
import com.github.catvod.crawler.SpiderDebug;
|
import com.github.catvod.crawler.SpiderDebug;
|
||||||
import com.github.catvod.utils.okhttp.OKCallBack;
|
import com.github.catvod.utils.okhttp.OKCallBack;
|
||||||
import com.github.catvod.utils.okhttp.OkHttpUtil;
|
import com.github.catvod.utils.okhttp.OkHttpUtil;
|
||||||
|
import okhttp3.Call;
|
||||||
|
import okhttp3.Cookie;
|
||||||
|
import okhttp3.Response;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
@@ -17,19 +18,9 @@ import org.jsoup.nodes.Document;
|
|||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
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 {
|
public class Bili extends Spider {
|
||||||
|
|
||||||
protected JSONObject ext = null;
|
protected JSONObject ext = null;
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ public class PushAgent extends Spider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static void refreshTk() {
|
private void refreshTk() {
|
||||||
long b = Time();
|
long b = Time();
|
||||||
String str = j;
|
String str = j;
|
||||||
if (str.isEmpty() || StopRefresh - b <= 600) {
|
if (str.isEmpty() || StopRefresh - b <= 600) {
|
||||||
@@ -236,6 +236,7 @@ public class PushAgent extends Spider {
|
|||||||
long j2 = jSONObject3.getLong("expires_in");
|
long j2 = jSONObject3.getLong("expires_in");
|
||||||
StopRefresh = b + j2;
|
StopRefresh = b + j2;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
fetchRule(false,0);
|
||||||
SpiderDebug.log(e);
|
SpiderDebug.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user