From 1e56b9791216796d17acdaea1b4f470b409dc71e Mon Sep 17 00:00:00 2001 From: hjdhnx Date: Fri, 9 Sep 2022 14:12:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=A5=BF=E7=93=9C=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/cms.py | 9 +++++---- "js/\345\220\270\347\223\234.js" | 19 +++++++++++++++++++ models/rules.db | Bin 40960 -> 40960 bytes readme.md | 2 ++ 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 "js/\345\220\270\347\223\234.js" diff --git a/controllers/cms.py b/controllers/cms.py index 60eacd4..8de2d67 100644 --- a/controllers/cms.py +++ b/controllers/cms.py @@ -112,7 +112,7 @@ class CMS: # print(headers) self.headers = headers self.host = host - self.homeUrl = urljoin(host,homeUrl) if host and homeUrl else homeUrl + self.homeUrl = urljoin(host,homeUrl) if host and homeUrl else homeUrl or host if url.find('[') >-1 and url.find(']') > -1: u1 = url.split('[')[0] u2 = url.split('[')[1].split(']')[0] @@ -369,8 +369,8 @@ class CMS: # print(self.url) print(self.headers) has_cache = False + # print(self.homeUrl) if self.homeUrl.startswith('http'): - # print(self.homeUrl) # print(self.class_parse) try: if self.class_parse: @@ -638,10 +638,11 @@ class CMS: if p == '*': vod = self.blank_vod() vod['vod_play_from'] = '道长在线' - vod['vod_remarks'] = self.play_url+detailUrl + vod['vod_remarks'] = detailUrl vod['vod_actor'] = '没有二级,只有一级链接直接嗅探播放' vod['vod_content'] = detailUrl - vod['vod_play_url'] = '嗅探播放$'+detailUrl + vod['vod_play_url'] = '嗅探播放$'+self.play_url+detailUrl + print(vod) return vod if not isinstance(p,dict) and not isinstance(p,str) and not str(p).startswith('js:'): diff --git "a/js/\345\220\270\347\223\234.js" "b/js/\345\220\270\347\223\234.js" new file mode 100644 index 0000000..acdabfd --- /dev/null +++ "b/js/\345\220\270\347\223\234.js" @@ -0,0 +1,19 @@ +var rule = { + title:'吸瓜', + host:'https://xgsp.tv', + // homeUrl:'', + url:'/list/?fyclass-fypage.html', + headers:{ + 'User-Agent':'MOBILE_UA' + }, + timeout:5000, + class_parse:'.wap-roll&&li;a&&Text;a&&href;(\\d+).html', + cate_exclude:'独家', + limit:5, + play_parse:true, + lazy:'js:let html=request(input);let a=html.match(/var now="(.*?)"/)[1];input=a', + 推荐:'ul.row.row-space7.row-m-space7.tx-column-5.tx-column-m-2;li;a&&title;img&&src;.ico-right&&Text;a&&href', + double:true, + 一级:'.tx-column-m-2.mb20&&li;h2&&Text;img&&src;.ico-right&&Text;a&&href', + 二级:'*', +} \ No newline at end of file diff --git a/models/rules.db b/models/rules.db index 8baf4fc801d9781903212783b1c35f751ce8ca68..55128d684d0163210f7a53c36e8b78434920dd5d 100644 GIT binary patch delta 325 zcmZoTz|?SnX@WH4^ocUgjMFzJEa7LCX4*WNUBHxyY4gU$G^To%Lkuq&B%5me8Jo9qqY&Uvz9?bF$NpX^!ibk!uar`wl4?O*(~YsIrYtJR<~J0?Hv*#+e6 zel}_Ci{))E)~#22Hht-{IcuIxU+{cEBaAbr6T|`OSvwsn1LkB+e+H3ywqeV&d2^m^ z+4o}k;uq_;0F`z=-?jY7o@LJ`w5dJc*Y|Yk=BI5lpU;`E_H4~^Apcpz^5-2J)n4wN z_-xwDC%d|z?A~UqW};@QW~OGYW}#-OW@w;hXsBjnp=M;MW^ANpY`nQwxSU5qny-?H xe;?m0egVG6{Plb-eE<1w@O|W~oGhiFwAoR?nva`{S&|VP7IWk_x9HUr0sw9YrpEvP delta 79 zcmV-V0I>gnzyg540+1U4l#v`m0hF;|qz?lc1C5gh5H$h>4zYnx1G9}2cMKL94uk>^ lz7CoX5Dw!He-4BW{|?v=@sk`NA_5Pvvk_oM4zq+Vd~wq(7~cQ@ diff --git a/readme.md b/readme.md index faaead4..2b4cf54 100644 --- a/readme.md +++ b/readme.md @@ -46,6 +46,8 @@ [dockerfile教程](https://blog.csdn.net/qq_46158060/article/details/125718218) [获取本地设备信息](https://blog.csdn.net/cui_yonghua/article/details/125508991) [获取本地设备信息](https://m.jb51.net/article/140716.htm) +###### 2022/09/09 +- [X] 1.增加西瓜源,修复一级不支持lazy的bug ###### 2022/09/08 - [X] 1.升级到3.2.9,支持自动合并自定义用户配置(内置t4测试源) - [X] 2.升级到3.3.0,增加奇珍异兽源 -- GitLab