Add files via upload

This commit is contained in:
ziyongdaima 2024-04-20 16:47:07 +08:00 committed by GitHub
parent ad172b0db2
commit 255feed8eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 371 additions and 0 deletions

View File

@ -0,0 +1,99 @@
原文出处https://github.com/UndCover/PyramidStore/blob/main/tutorial.md
自动添加代码https://github.com/lm317379829/TVBoxDIY
## Pyramid添加教程
以下代码使用TVBOXOSC最后一个版本作为样例其他的衍生版本请自行参考。目前只支持armeabi-v7a和x86_64测试结束后续会放出所有版本支持
### 添加过程
##### 1.添加pyramid.aar到android项目libs目录下
##### 2.在 app\build.gradle 中添加内容
```gralde
dependencies {
//添加pyramid.aar引用
implementation files('libs\\pyramid.aar')
}
```
##### 3.在 app\proguard-rules.pro 中添加内容
```pro
-keep public class com.undcover.freedom.pyramid.** { *; }
-dontwarn com.undcover.freedom.pyramid.**
-keep public class com.chaquo.python.** { *; }
-dontwarn com.chaquo.python.**
```
##### 4.修改项目 App.java
```java
// 添加引用
import com.undcover.freedom.pyramid.PythonLoader;
public class App extends MultiDexApplication {
//...
}
```
```java
public void onCreate() {
// ....
PlayerHelper.init();
//pyramid-add-start
PythonLoader.getInstance().setApplication(this);
//pyramid-add-end
}
```
##### 5.修改 ApiConfig.java
```java
// 添加引用 51行
import com.github.catvod.crawler.SpiderNull;
import com.undcover.freedom.pyramid.PythonLoader;
public class ApiConfig {
//...
}
```
```java
private void parseJson(String apiUrl, String jsonStr) {
//pyramid-add-start 309行
PythonLoader.getInstance().setConfig(jsonStr);
//pyramid-add-end
JsonObject infoJson = new Gson().fromJson(jsonStr, JsonObject.class);
//....
}
```
```java
public Spider getCSP(SourceBean sourceBean) {
//pyramid-add-start 俊版589行 TK668行
if (sourceBean.getApi().startsWith("py_")) {
try {
return PythonLoader.getInstance().getSpider(sourceBean.getKey(), sourceBean.getExt());
} catch (Exception e) {
e.printStackTrace();
return new SpiderNull();
}
}
//pyramid-add-end
return jarLoader.getSpider(sourceBean.getKey(), sourceBean.getApi(), sourceBean.getExt());
}
```
```java
public Object[] proxyLocal(Map param) {
//pyramid-add-start 俊版605行 TK687行
try {
if(param.containsKey("api")){
String doStr = param.get("do").toString();
if(doStr.equals("ck"))
return PythonLoader.getInstance().proxyLocal("","",param);
SourceBean sourceBean = ApiConfig.get().getSource(doStr);
return PythonLoader.getInstance().proxyLocal(sourceBean.getKey(),sourceBean.getExt(),param);
}
} catch (Exception e) {
e.printStackTrace();
}
//pyramid-add-end
return jarLoader.proxyInvoke(param);
}
```

View File

@ -0,0 +1,28 @@
## TVBOX的XBiubiu规则
## XBiubiu 使用方法
![4b20344b021a0c690daa9540d4c69ee](https://user-images.githubusercontent.com/102397160/182081560-9d6acb49-0bed-4de8-83a5-14fe840f667b.png)
## ![68747470733a2f2f6c6975363733636e2e6769746875622e696f2f626f782f7375622f5862622f6230312e6a7067](https://user-images.githubusercontent.com/102397160/182079920-903aeb76-6c7d-4c58-9324-5602fd26aed2.jpg)
![c8c881b01f7bd218be74eccbd822c2e](https://user-images.githubusercontent.com/102397160/182081615-fa039af2-9706-4a0b-b0cd-542853979c3b.png)
## ![68747470733a2f2f6c6975363733636e2e6769746875622e696f2f626f782f7375622f5862622f6230312e312e6a7067](https://user-images.githubusercontent.com/102397160/182080343-1ddab3ed-98a9-4919-a390-649b02473c5c.jpg)
"jiequshuzuqian": "class=\"stui-vodlist__box\"", //------截取的列表数组的前关键词,截取的关键词有 " 的用 \ 进行转义
"jiequshuzuhou": "</span>", //------截取的列表数组的后关键词
## ![68747470733a2f2f6c6975363733636e2e6769746875622e696f2f626f782f7375622f5862622f6230322e312e6a7067](https://user-images.githubusercontent.com/102397160/182080422-e930ddb7-0b87-4b42-a16d-29e8853daa4b.jpg)
![2fef43e0c9d7b167e7354c0ff14d5fd](https://user-images.githubusercontent.com/102397160/182081764-cd8bf96f-f305-4a57-a9a3-fdbedd10bd51.png)
## ![68747470733a2f2f6c6975363733636e2e6769746875622e696f2f626f782f7375622f5862622f6230322e322e6a7067](https://user-images.githubusercontent.com/102397160/182080520-ebf50e25-b253-4c8c-bef4-3edda78788b1.jpg)
![c35e334e7e44684e2cec191eba75572](https://user-images.githubusercontent.com/102397160/182081812-3b7682db-e151-403b-993b-cecd1ab2004a.png)
## ![68747470733a2f2f6c6975363733636e2e6769746875622e696f2f626f782f7375622f5862622f6230332e6a7067](https://user-images.githubusercontent.com/102397160/182080617-5d5578a1-479a-4e38-bd63-eb865eb28e5a.jpg)
![de36c08b83008946bdeafe25d1bb859](https://user-images.githubusercontent.com/102397160/182081889-29ec3eea-d72c-47ee-8535-0b5be28a3c3b.png)
## ![68747470733a2f2f6c6975363733636e2e6769746875622e696f2f626f782f7375622f5862622f6230342e6a7067](https://user-images.githubusercontent.com/102397160/182080684-eb767c6f-3e48-4d99-a162-8c17608a1a21.jpg)
![5cbe8b586dc2de09baa92105bcc4613](https://user-images.githubusercontent.com/102397160/182081944-fd876483-ad72-4ead-9ccc-adaaab6905cc.png)

View File

@ -0,0 +1,189 @@
//xpathjsoup2022919
//jsoupjs
//
// &&&&
{
//
"规则名": "XYQHiker中文模板",
//
"规则作者": "香雅情",
//UA,$#okhttp/3.12.11MOBILE_UAPC_UA使UA
//"User-Agent$PC_UA#Referer$http://ww.baidu.com#Cookie$ser=ok",#
//UAPCUAContent-Type
"请求头参数":"PC_UA",
//UTF-8UTF-8GBKGB2312
"网页编码格式":"UTF-8",
//
"图片是否需要代理":"0",
//01
"是否开启获取首页数据":"0",
//
"首页推荐链接": "http://www.lezhutv.com",
//
"首页列表数组规则": "body&&.myui-vodlist",
//
"首页片单列表数组规则": "li",
//jsouphtml1jsoup()0
"首页片单是否Jsoup写法":"1",
//
//
"首页片单标题": "h4&&a&&Text",
//
"首页片单链接": "h4&&a&&href",
//
"首页片单图片": ".lazyload&&data-original",
//
"首页片单副标题":".pic-text&&Text",
//
"首页片单链接加前缀": "http://www.lezhutv.com",
//
"首页片单链接加后缀": "",
//,
"分类起始页码": "1",
//,{cateId}{catePg}, [firstPage=]
// https://www.libvio.me/show/{cateId}-{area}-{by}-{class}-{lang}----{catePg}---{year}.html
"分类链接": "http://www.lezhutv.com/vodshow/{cateId}--------{catePg}---.html[firstPage=第一页不含页码的链接]",
//1&2&3
"分类名称": "电影&电视剧&综艺&动漫",
//1&2&3&id=0&id=1
"分类名称替换词": "1&2&3&4",
//clan://(bug)httpjsonxpathext使
"筛选数据":{},
//!!!使ext"筛选数据":"ext"
//{cateId}1&2||1&2
"筛选子分类名称": "动作片&喜剧片||国产剧&日韩剧||空||国产动漫&日本动漫",
//1&2&3&id=0&id=1*
"筛选子分类替换词": "5&6||13&14||空||26&27",
///{class}1&2&3
"筛选类型名称": "爱情&喜剧&科幻",
///1&2&3*
"筛选类型替换词": "爱情&喜剧&科幻",
//{area}1&2&3
"筛选地区名称": "中国&新加坡",
//1&2&3&id=0&id=1*
"筛选地区替换词": "中国&新加坡",
//{year}1&2&3
"筛选年份名称": "2022&2021",
//1&2&3*
"筛选年份替换词": "2022&2021",
//{lang}1&2&3
"筛选语言名称": "国语&英语",
//1&2&3*
"筛选语言替换词": "国语&英语",
//{by}1&2&3
"筛选排序名称": "时间&人气&评分",
//1&2&3*
"筛选排序替换词": "time&hits&score",
//0json
"分类截取模式": "1",
//使json0data(&&),&&json
"分类Json数据二次截取":"",
//3
"分类列表数组规则": ".myui-vodlist&&li",
//jsouphtml1jsoup()0
"分类片单是否Jsoup写法":"1",
//
//
"分类片单标题": "h4&&a&&Text",
//
"分类片单链接": "h4&&a&&href",
//
"分类片单图片": ".lazyload&&data-original",
//
"分类片单副标题":".pic-text&&Text",
//
"分类片单链接加前缀": "http://www.lezhutv.com",
//
"分类片单链接加后缀": "",
//,okhttp/3.12.11MOBILE_UAPC_UA使UA
//$#"User-Agent$PC_UA#Referer$http://ww.baidu.com#Cookie$ser=ok"
"搜索请求头参数":"User-Agent$PC_UA",
//{wd}post;post
//POST http://www.lezhutv.com/index.php?m=vod-search;post
"搜索链接": "http://www.lezhutv.com/index.php/vod/search/page/1/wd/{wd}.html",
//POSTParamsutf-8searchwordwdPOST
"POST请求数据":"wd={wd}&search=",
//,0jsonlist
"搜索截取模式": "0",
//list3
"搜索列表数组规则": "list",
//jsouphtml1jsoup()0
"搜索片单是否Jsoup写法":"1",
//
"搜索片单图片": "pic",
//
"搜索片单标题": "name",
//
"搜索片单链接": "id",
//
"搜索片单副标题":"",
//
"搜索片单链接加前缀": "http://www.lezhutv.com",
//json
"搜索片单链接加后缀": ".html",
//012
//3
"链接是否直接播放": "0",
//
"直接播放链接加前缀": "https://live.52sf.ga/huya/",
//#isVideo=true#
"直接播放链接加后缀": "#isVideo=true#",
//#
"直接播放直链视频请求头": "authority$ku.peizq.online#Referer$https://play.peizq.online",
//jsoup1jsoup()0
"详情是否Jsoup写法":"0",
//&&
"类型详情": "",
//&&
"年代详情": "",
//&&
"地区详情": "",
//&&
"演员详情": "演员:&&</p>",
//&&
"简介详情": "简介:&&</p>",
//线tab_titletab_arr_rule
//线
"线路列表数组规则": ".tabs&&li",
//线&&
//线==> "线路标题": "h3&&Text[不包含:网盘,云盘]",
"线路标题": "a&&alt",
//
"播放列表数组规则": "body&&.play_list",
//
"选集列表数组规则": "li",
//jsoup1jsoup()0
"选集标题链接是否Jsoup写法":"1",
//&&
"选集标题": "a&&Text",
//&&
"选集链接": "a&&href",
//
"是否反转选集序列": "0",
//
"选集链接加前缀": "http://www.lezhutv.com",
//
"选集链接加后缀": "",
//
//<script type="text/javascript">var player_aaaa={"flag":"play","encrypt
//0
"分析MacPlayer":"0",
//01
"是否开启手动嗅探":"0",
//#
"手动嗅探视频链接关键词":".mp4#.m3u8#.flv#video/tos",
//,#
"手动嗅探视频链接过滤词":".html#?http"
}

View File

@ -0,0 +1,55 @@
{
"规则名": "XYQHiker模板",
"规则作者": "香雅情",
"请求头参数":"MOBILE_UA",
"网页编码格式":"UTF-8",
"图片是否需要代理":"0",
"是否开启获取首页数据":"0",
"分类起始页码": "1",
"分类链接": "https://www.l0l.tv/index.php/vod/show/id/{cateId}/page/{catePg}.html",
"分类名称": "电影&电视剧&动漫&综艺&bilibili&",
"分类名称替换词": "1&2&3&4&5&",
"筛选数据":{},
"分类截取模式": "1",
"分类列表数组规则": ".list-width&&.top&&a",
"分类片单是否Jsoup写法":"1",
"分类片单标题": "a&&title",
"分类片单链接": "a&&href",
"分类片单图片": ".lazy.eclazy.br&&data-original",
"分类片单副标题":"",
"分类片单链接加前缀": "https://www.l0l.tv",
"分类片单链接加后缀": "",
"搜索请求头参数":"User-Agent$PC_UA",
"搜索链接": "https://www.l0l.tv/index.php/ajax/suggest?mid=1&wd={wd}",
"POST请求数据":"0",
"搜索截取模式": "0",
"搜索列表数组规则": "list",
"搜索片单是否Jsoup写法":"1",
"搜索片单图片": "pic",
"搜索片单标题": "name",
"搜索片单链接": "id",
"搜索片单副标题":"",
"搜索片单链接加前缀": "https://www.l0l.tv/index.php/vod/play/id/",
"搜索片单链接加后缀": "/sid/1/nid/1.html",
"详情是否Jsoup写法":"0",
"类型详情": "",
"年代详情": "",
"地区详情": "",
"演员详情": "导演:</span>&&</p>",
"简介详情": "概要:</span>&&</p>",
"线路列表数组规则": "#tag&&a",
"线路标题": "a&&Text",
"播放列表数组规则": "body&&.content_playlist",
"选集列表数组规则": "li",
"选集标题链接是否Jsoup写法":"1",
"选集标题": "a&&Text",
"选集链接": "a&&href",
"是否反转选集序列": "0",
"选集链接加前缀": "https://www.l0l.tv",
"选集链接加后缀": "",
"分析MacPlayer":"1",
"是否开启手动嗅探":"1",
"手动嗅探视频链接关键词":".mp4#.m3u8#.flv",
"手动嗅探视频链接过滤词":".html#=http"
}