Fix init error bug
This commit is contained in:
parent
e8068ad60b
commit
43f0e1a76c
|
|
@ -42,9 +42,14 @@ public class Bili extends Spider {
|
||||||
header.put("Referer", url);
|
header.put("Referer", url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void fetchExt() {
|
||||||
|
String result = OkHttpUtil.string(extend);
|
||||||
|
if (!TextUtils.isEmpty(result)) extend = result;
|
||||||
|
}
|
||||||
|
|
||||||
private void fetchRule() throws Exception {
|
private void fetchRule() throws Exception {
|
||||||
if (header.containsKey("cookie") && header.get("cookie").length() > 0) return;
|
if (header.containsKey("cookie") && header.get("cookie").length() > 0) return;
|
||||||
if (extend.startsWith("http")) extend = OkHttpUtil.string(extend);
|
if (extend.startsWith("http")) fetchExt();
|
||||||
ext = new JSONObject(extend);
|
ext = new JSONObject(extend);
|
||||||
setHeader();
|
setHeader();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
2d2edf4641fcba0a6f315a29cdbbef51
|
940f5635d30de6ef9025c334afaf706b
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue