ng bug
This commit is contained in:
parent
28c053e2e5
commit
5293a4f640
|
|
@ -7,6 +7,7 @@ import android.widget.Button;
|
|||
import com.github.catvod.R;
|
||||
import com.github.catvod.crawler.Spider;
|
||||
import com.github.catvod.spider.Init;
|
||||
import com.github.catvod.spider.NG;
|
||||
import com.github.catvod.spider.PTT;
|
||||
import com.github.catvod.spider.Zxzj;
|
||||
import com.orhanobut.logger.AndroidLogAdapter;
|
||||
|
|
@ -47,7 +48,7 @@ public class MainActivity extends Activity {
|
|||
private void initSpider() {
|
||||
try {
|
||||
Init.init(getApplicationContext());
|
||||
spider = new Zxzj();
|
||||
spider = new NG();
|
||||
spider.init(this, "");
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
|
|
@ -75,7 +76,7 @@ public class MainActivity extends Activity {
|
|||
HashMap<String, String> extend = new HashMap<>();
|
||||
extend.put("c", "19");
|
||||
extend.put("year", "2024");
|
||||
Logger.t("categoryContent").d(spider.categoryContent("/list/1.html", "2", true, extend));
|
||||
Logger.t("categoryContent").d(spider.categoryContent("1", "2", true, extend));
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,25 @@ public class NG extends Spider {
|
|||
classList.add(clazz);
|
||||
}
|
||||
}
|
||||
return Result.string(classList, filters);
|
||||
Map<String, String> params = new HashMap<>(getParams());
|
||||
/* for (String s : extend.keySet()) {
|
||||
params.put(s, URLEncoder.encode(extend.get(s), "UTF-8"));
|
||||
}*/
|
||||
params.put("page", "1");
|
||||
params.put("id", classList.get(0).getTypeId());
|
||||
String string = OkHttp.string(COMMON_URL + FIND_VIDEO_VOD_LIST, params, getHeaders());
|
||||
Type type = new TypeToken<Rst<It>>() {
|
||||
}.getType();
|
||||
Rst<It> resp = Json.parseSafe(string, type);
|
||||
List<Vod> vodList = new ArrayList<>();
|
||||
if (resp != null && resp.isSuccess()) {
|
||||
for (It it : resp.getList()) {
|
||||
vodList.add(it.toVod());
|
||||
}
|
||||
} else {
|
||||
SpiderDebug.log("ng cate error: " + string);
|
||||
}
|
||||
return Result.string(classList, vodList, filters);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
f75b8430b95b293a3c4bc8a624438d93
|
||||
2fd4e67c5d0b4025572442b8a5df401f
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;f75b8430b95b293a3c4bc8a624438d93",
|
||||
"spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;2fd4e67c5d0b4025572442b8a5df401f",
|
||||
"lives": [
|
||||
{
|
||||
"name": "直播ipv6",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;f75b8430b95b293a3c4bc8a624438d93",
|
||||
"spider": "https://androidcatvodspider.pages.dev/jar/custom_spider.jar;md5;2fd4e67c5d0b4025572442b8a5df401f",
|
||||
"lives": [
|
||||
{
|
||||
"name": "直播ipv6",
|
||||
|
|
|
|||
Loading…
Reference in New Issue