0){new_vod_list=forceOrder(new_vod_list,"",x=>x.split("$")[0]);console.log(`drpy影响性能代码共计列表数循环次数:${new_vod_list.length},耗时:${(new Date).getTime()-tt1}毫秒`)}let vlist=new_vod_list.join("#");vod_tab_list.push(vlist)}vod_play_url=vod_tab_list.join(vod_play_url)}}vod.vod_play_url=vod_play_url}if(rule.图片来源&&vod.vod_pic&&vod.vod_pic.startsWith("http")){vod.vod_pic=vod.vod_pic+rule.图片来源}if(!vod.vod_id||vod_id.includes("$")&&vod.vod_id!==vod_id){vod.vod_id=vod_id}let t2=(new Date).getTime();console.log(`加载二级界面${MY_URL}耗时:${t2-t1}毫秒`);return JSON.stringify({list:[vod]})}function tellIsJx(url){try{let is_vip=!/\.(m3u8|mp4|m4a)$/.test(url.split("?")[0])&&是否正版(url);return is_vip?1:0}catch(e){return 1}}function playParse(playObj){fetch_params=JSON.parse(JSON.stringify(rule_fetch_params));MY_URL=playObj.url;if(!/http/.test(MY_URL)){try{MY_URL=base64Decode(MY_URL)}catch(e){}}MY_URL=decodeURIComponent(MY_URL);var input=MY_URL;let common_play={parse:1,url:input,jx:tellIsJx(input)};let lazy_play;if(!rule.play_parse||!rule.lazy){lazy_play=common_play}else if(rule.play_parse&&rule.lazy&&typeof rule.lazy==="string"){try{let lazy_code=rule.lazy.replace("js:","").trim();print("开始执行js免嗅=>"+lazy_code);eval(lazy_code);lazy_play=typeof input==="object"?input:{parse:1,jx:tellIsJx(input),url:input}}catch(e){print("js免嗅错误:"+e.message);lazy_play=common_play}}else{lazy_play=common_play}if(Array.isArray(rule.play_json)&&rule.play_json.length>0){let web_url=lazy_play.url;for(let pjson of rule.play_json){if(pjson.re&&(pjson.re==="*"||web_url.match(new RegExp(pjson.re)))){if(pjson.json&&typeof pjson.json==="object"){let base_json=pjson.json;lazy_play=Object.assign(lazy_play,base_json);break}}}}else if(rule.play_json&&!Array.isArray(rule.play_json)){let base_json={jx:1,parse:1};lazy_play=Object.assign(lazy_play,base_json)}else if(!rule.play_json){let base_json={jx:0,parse:1};lazy_play=Object.assign(lazy_play,base_json)}console.log(JSON.stringify(lazy_play));return JSON.stringify(lazy_play)}function init(ext){console.log("init");try{let muban=模板.getMubans();if(typeof ext=="object"){rule=ext}else if(typeof ext=="string"){if(ext.startsWith("http")){let js=request(ext,{method:"GET"});if(js){eval(js.replace("var rule","rule"))}}else{eval(ext.replace("var rule","rule"))}}if(rule.模板&&muban.hasOwnProperty(rule.模板)){print("继承模板:"+rule.模板);rule=Object.assign(muban[rule.模板],rule)}let rule_cate_excludes=(rule.cate_exclude||"").split("|").filter(it=>it.trim());let rule_tab_excludes=(rule.tab_exclude||"").split("|").filter(it=>it.trim());rule_cate_excludes=rule_cate_excludes.concat(CATE_EXCLUDE.split("|").filter(it=>it.trim()));rule_tab_excludes=rule_tab_excludes.concat(TAB_EXCLUDE.split("|").filter(it=>it.trim()));rule.cate_exclude=rule_cate_excludes.join("|");rule.tab_exclude=rule_tab_excludes.join("|");rule.host=(rule.host||"").rstrip("/");rule.url=rule.url||"";rule.double=rule.double||false;rule.homeUrl=rule.homeUrl||"";rule.detailUrl=rule.detailUrl||"";rule.searchUrl=rule.searchUrl||"";rule.homeUrl=rule.host&&rule.homeUrl?urljoin(rule.host,rule.homeUrl):rule.homeUrl||rule.host;rule.detailUrl=rule.host&&rule.detailUrl?urljoin(rule.host,rule.detailUrl):rule.detailUrl;rule.二级访问前=rule.二级访问前||"";if(rule.url.includes("[")&&rule.url.includes("]")){let u1=rule.url.split("[")[0];let u2=rule.url.split("[")[1].split("]")[0];rule.url=rule.host&&rule.url?urljoin(rule.host,u1)+"["+urljoin(rule.host,u2)+"]":rule.url}else{rule.url=rule.host&&rule.url?urljoin(rule.host,rule.url):rule.url}rule.searchUrl=rule.host&&rule.searchUrl?urljoin(rule.host,rule.searchUrl):rule.searchUrl;rule.timeout=rule.timeout||5e3;rule.encoding=rule.编码||rule.encoding||"utf-8";rule.search_encoding=rule.搜索编码||rule.search_encoding||"";rule.图片来源=rule.图片来源||"";rule.play_json=rule.hasOwnProperty("play_json")?rule.play_json:[];rule.pagecount=rule.hasOwnProperty("pagecount")?rule.pagecount:{};if(rule.headers&&typeof rule.headers==="object"){try{let header_keys=Object.keys(rule.headers);for(let k of header_keys){if(k.toLowerCase()==="user-agent"){let v=rule.headers[k];console.log(v);if(["MOBILE_UA","PC_UA","UC_UA","IOS_UA","UA"].includes(v)){rule.headers[k]=eval(v)}}}}catch(e){console.log("处理headers发生错误:"+e.message)}}rule_fetch_params={headers:rule.headers||false,timeout:rule.timeout,encoding:rule.encoding};oheaders=rule.headers||{};RKEY=typeof key!=="undefined"&&key?key:"drpy_"+(rule.title||rule.host);pre();init_test()}catch(e){console.log("init_test发生错误:"+e.message)}}let homeHtmlCache=undefined;function home(filter){console.log("home");let homeObj={filter:rule.filter||false,MY_URL:rule.homeUrl,class_name:rule.class_name||"",class_url:rule.class_url||"",class_parse:rule.class_parse||"",cate_exclude:rule.cate_exclude};return homeParse(homeObj)}function homeVod(params){console.log("homeVod");let homeVodObj={"推荐":rule.推荐,double:rule.double,homeUrl:rule.homeUrl,detailUrl:rule.detailUrl};return homeVodParse(homeVodObj)}function category(tid,pg,filter,extend){let cateObj={url:rule.url,"一级":rule.一级,tid:tid,pg:parseInt(pg),filter:filter,extend:extend};return categoryParse(cateObj)}function detail(vod_url){let orId=vod_url;let fyclass="";log("orId:"+orId);if(vod_url.indexOf("$")>-1){let tmp=vod_url.split("$");fyclass=tmp[0];vod_url=tmp[1]}let detailUrl=vod_url.split("@@")[0];let url;if(!detailUrl.startsWith("http")&&!detailUrl.includes("/")){url=rule.detailUrl.replaceAll("fyid",detailUrl).replaceAll("fyclass",fyclass)}else if(detailUrl.includes("/")){url=urljoin(rule.homeUrl,detailUrl)}else{url=detailUrl}let detailObj={orId:orId,url:url,"二级":rule.二级,"二级访问前":rule.二级访问前,detailUrl:detailUrl,fyclass:fyclass,tab_exclude:rule.tab_exclude};return detailParse(detailObj)}function play(flag,id,flags){let playObj={url:id,flag:flag,flags:flags};return playParse(playObj)}function search(wd,quick){if(rule.search_encoding){if(rule.search_encoding.toLowerCase()!=="utf-8"){wd=encodeStr(wd,rule.search_encoding)}}else if(rule.encoding&&rule.encoding.toLowerCase()!=="utf-8"){wd=encodeStr(wd,rule.encoding)}let searchObj={searchUrl:rule.searchUrl,"搜索":rule.搜索,wd:wd,pg:1,quick:quick};return searchParse(searchObj)}function DRPY(){return{init:init,home:home,homeVod:homeVod,category:category,detail:detail,play:play,search:search}}export default{init:init,home:home,homeVod:homeVod,category:category,detail:detail,play:play,search:search,DRPY:DRPY};
\ No newline at end of file
diff --git a/py/哔哩搜索.js b/py/哔哩搜索.js
index b8961d7..6e6bc7d 100644
--- a/py/哔哩搜索.js
+++ b/py/哔哩搜索.js
@@ -4,7 +4,7 @@ let url2 = input+'media_ft';
let html = request(url1);
let msg = JSON.parse(html).message;
if(msg!=='0'){
- VODS = [{vod_name:KEY + '➢'+msg,vod_id:'no_data',vod_remarks:'别点,缺少bili_cookie',vod_pic:'https://ghproxy.com/https://raw.githubusercontent.com/hjdhnx/dr_py/main/404.jpg'}];
+ VODS = [{vod_name:KEY + '➢'+msg,vod_id:'no_data',vod_remarks:'别点,缺少bili_cookie',vod_pic:'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/404.jpg'}];
}else {
let jo1 = JSON.parse(html).data;
html = request(url2);
diff --git a/readme.md b/readme.md
index 202938b..0199a3d 100644
--- a/readme.md
+++ b/readme.md
@@ -1,7 +1,7 @@
[comment]: <> (#### 🚀dr模板的python实现🚀)
🚀第二派-dr模板的python实现🚀
-

+
🗂️A webServer convert web and x5 movie sites to cms api data
@@ -55,7 +55,7 @@
#### 项目修复
进入容器drpy项目根目录执行以下代码
```shell
-cd utils && rm update.py && wget https://ghproxy.com/https://raw.githubusercontent.com/hjdhnx/dr_py/main/utils/update.py
+cd utils && rm update.py && wget https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/utils/update.py
```
执行后重启9001或者docker即可正常检测升级
diff --git a/start.sh b/start.sh
index 863b62d..f539bf6 100644
--- a/start.sh
+++ b/start.sh
@@ -2,7 +2,7 @@
# 建立文件夹
mkdir -p /home/pywork/dr_py && cd /home/pywork/dr_py
# 下载仓库包
-wget https://ghproxy.com/https://github.com/hjdhnx/dr_py/archive/refs/heads/main.zip -O dr_py.zip
+wget https://ghproxy.net/https://github.com/hjdhnx/dr_py/archive/refs/heads/main.zip -O dr_py.zip
# 解压
unzip dr_py.zip
# 移动文件到当前目录
diff --git a/txt/json/live2mv_data.json b/txt/json/live2mv_data.json
index 4132d50..0db02cf 100644
--- a/txt/json/live2mv_data.json
+++ b/txt/json/live2mv_data.json
@@ -1,6 +1,6 @@
[
{"name": "甜蜜", "url": "http://zdir.kebedd69.repl.co/public/live.txt"},
-{"name": "巧计", "url": "https://ghproxy.com/https://raw.githubusercontent.com/dxawi/1/main/tvlive.txt"},
+{"name": "巧计", "url": "https://ghproxy.net/https://raw.githubusercontent.com/dxawi/1/main/tvlive.txt"},
{"name": "星辰", "url": "http://tvmvip.com/xclive.txt"},
{"name": "俊于", "url": "http://home.jundie.top:81/Cat/tv/live.txt"},
{"name": "多多", "url": "https://yydsys.top/duo/txt/v.txt"},
diff --git a/txt/muban/drpy模板.js b/txt/muban/drpy模板.js
index 9c3891c..639422d 100644
--- a/txt/muban/drpy模板.js
+++ b/txt/muban/drpy模板.js
@@ -1,11 +1,11 @@
import ch from './cheerio.min.js';
// import Uri from './uri.min.js';
// var URI = require('urijs');
-// import 模板 from 'https://ghproxy.com/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/模板.js'
+// import 模板 from 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/模板.js'
// var rule = Object.assign(模板.首图2,{
// host: 'https://www.zbkk.net',
// });
-import template from 'https://ghproxy.com/https://raw.githubusercontent.com/hjdhnx/dr_py/main/txt/pluto/template-web.js'
+import template from 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/txt/pluto/template-web.js'
var ahtml = template.render('hi, <%=value%>.', {value: 'aui'});
console.log(ahtml);
diff --git a/txt/pluto/drpy.js b/txt/pluto/drpy.js
index 4f9a497..da0c056 100644
--- a/txt/pluto/drpy.js
+++ b/txt/pluto/drpy.js
@@ -2,7 +2,7 @@ import ch from './cheerio.min.js';
// import 'http://192.168.10.99:5705/txt/pluto/drT.js';
// import 'http://192.168.3.239:5705/txt/pluto/drT.js';
import 'http://gitcode.net/qq_32394351/dr_py/-/raw/master/txt/pluto/drT.js';
-// import 模板 from 'https://ghproxy.com/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/模板.js'
+// import 模板 from 'https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/模板.js'
// var rule = Object.assign(模板.首图2,{
// host: 'https://www.zbkk.net',
// });
diff --git a/utils/update.py b/utils/update.py
index 1d00dcc..7e9f7fa 100644
--- a/utils/update.py
+++ b/utils/update.py
@@ -75,7 +75,7 @@ def getOnlineVer():
try:
# r = requests.get('https://gitcode.net/qq_32394351/dr_py/-/raw/master/js/version.txt',timeout=(2,2))
# r = requests.get('https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/raw/master/js/version.txt',timeout=(2,2))
- r = requests.get('https://ghproxy.com/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/version.txt',timeout=(2,2))
+ r = requests.get('https://ghproxy.net/https://raw.githubusercontent.com/hjdhnx/dr_py/main/js/version.txt',timeout=(2,2))
ver = r.text
except Exception as e:
# print(f'{e}')
@@ -171,7 +171,7 @@ def download_new_version():
os.makedirs(tmp_path,exist_ok=True)
# url = 'https://gitcode.net/qq_32394351/dr_py/-/archive/master/dr_py-master.zip'
# url = 'https://code.gitlink.org.cn/api/v1/repos/hjdhnx/dr_py/archive/master.zip'
- url = 'https://ghproxy.com/https://github.com/hjdhnx/dr_py/archive/refs/heads/main.zip'
+ url = 'https://ghproxy.net/https://github.com/hjdhnx/dr_py/archive/refs/heads/main.zip'
# tmp_files = os.listdir(tmp_path)
# for tp in tmp_files:
# print(f'清除缓存文件:{tp}')