Merge branch 'main' of https://github.com/FongMi/CatVodSpider
This commit is contained in:
commit
554805e266
|
|
@ -37,4 +37,12 @@ public abstract class Spider {
|
|||
public String playerContent(String flag, String id, List<String> vipFlags) throws Exception {
|
||||
return "";
|
||||
}
|
||||
|
||||
public boolean manualVideoCheck() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isVideoFormat(String url) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,10 @@ public class Init {
|
|||
get().handler.post(runnable);
|
||||
}
|
||||
|
||||
public static void run(Runnable runnable, int delay) {
|
||||
get().handler.postDelayed(runnable, delay);
|
||||
}
|
||||
|
||||
public static void show(String msg) {
|
||||
get().handler.post(() -> Toast.makeText(context(), msg, Toast.LENGTH_LONG).show());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
package com.github.catvod.spider;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.github.catvod.crawler.Spider;
|
||||
|
||||
public class Live extends Spider {
|
||||
|
||||
private int delay;
|
||||
|
||||
@Override
|
||||
public void init(Context context, String extend) {
|
||||
super.init(context, extend);
|
||||
this.delay = delay(extend);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String homeVideoContent() {
|
||||
Init.run(this::openLive, delay);
|
||||
return "";
|
||||
}
|
||||
|
||||
private int delay(String extend) {
|
||||
try {
|
||||
return TextUtils.isEmpty(extend) ? 0 : Integer.parseInt(extend);
|
||||
} catch (Throwable ignored) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private void openLive() {
|
||||
try {
|
||||
Activity activity = Init.getActivity();
|
||||
activity.startActivity(new Intent().setComponent(new ComponentName(activity, "com.fongmi.android.tv.ui.activity.LiveActivity")));
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
279424aa7be0e38dbd884daf8913c1d4
|
||||
e200bfe02aff07b4b4e789dbdb0d15aa
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;279424aa7be0e38dbd884daf8913c1d4",
|
||||
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;e200bfe02aff07b4b4e789dbdb0d15aa",
|
||||
"wallpaper": "https://gao.chuqiuyu.tk",
|
||||
"lives": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,16 +1,9 @@
|
|||
{
|
||||
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;279424aa7be0e38dbd884daf8913c1d4",
|
||||
"spider": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/jar/custom_spider.jar;md5;e200bfe02aff07b4b4e789dbdb0d15aa",
|
||||
"wallpaper": "http://www.kf666888.cn/api/tvbox/img",
|
||||
"lives": [
|
||||
{
|
||||
"name": "直播",
|
||||
"type": 0,
|
||||
"url": "http://home.jundie.top:81/Cat/tv/live.txt",
|
||||
"epg": "https://epg.112114.xyz/?ch={name}&date={date}",
|
||||
"logo": "https://epg.112114.xyz/logo/{name}.png"
|
||||
},
|
||||
{
|
||||
"name": "測試",
|
||||
"type": 1,
|
||||
"url": "https://ghproxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/json/live.json",
|
||||
"epg": "http://epg.51zmt.top:8000/api/diyp/?ch={epg}&date={date}",
|
||||
|
|
@ -161,6 +154,15 @@
|
|||
"filterable": 0,
|
||||
"ext": "http://我不是.肥猫.love:63/token.php"
|
||||
},
|
||||
{
|
||||
"key": "Live",
|
||||
"name": "直播",
|
||||
"type": 3,
|
||||
"api": "csp_Live",
|
||||
"searchable": 0,
|
||||
"filterable": 0,
|
||||
"ext": "2000"
|
||||
},
|
||||
{
|
||||
"key": "push_agent",
|
||||
"name": "推送",
|
||||
|
|
|
|||
Loading…
Reference in New Issue