From 0ab4f4f6ec0786b20d536425644bc9b6c5ffaf14 Mon Sep 17 00:00:00 2001 From: hjdhnx Date: Wed, 31 Aug 2022 00:50:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0libvideo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 1 + classes/cms.py | 1 + js/LIBVIO.js | 9 +++++++++ "js/\346\250\241\346\235\277.js" | 4 ++-- models/rules.db | Bin 32768 -> 32768 bytes 5 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 js/LIBVIO.js diff --git a/app.py b/app.py index c7cf03b..4b151d5 100644 --- a/app.py +++ b/app.py @@ -110,6 +110,7 @@ def vod(): # print(type(rule)) # print(ruleDict) logger.info(f'js装载耗时:{get_interval(t2)}毫秒') + # print(ruleDict) # print(rule) cms = CMS(ruleDict,db,RuleClass,PlayParse,app.config) wd = getParmas('wd') diff --git a/classes/cms.py b/classes/cms.py index 79a9ece..0fc5e0b 100644 --- a/classes/cms.py +++ b/classes/cms.py @@ -350,6 +350,7 @@ class CMS: r = requests.get(self.homeUrl, headers=self.headers, timeout=self.timeout) r.encoding = self.encoding html = r.text + print(html) if self.class_parse and not has_cache: p = self.class_parse.split(';') # print(p) diff --git a/js/LIBVIO.js b/js/LIBVIO.js new file mode 100644 index 0000000..10efee0 --- /dev/null +++ b/js/LIBVIO.js @@ -0,0 +1,9 @@ +var rule = Object.assign(muban.首图2,{ +title:'LIBVIO', +host:'https://www.libvio.me', +url:'/type/fyclass-fypage.html', +class_parse:'.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;/(\\d+).html', +searchUrl:'/search/**----------fypage---.html', +searchable:1, +quickSearch:1, +}); \ No newline at end of file diff --git "a/js/\346\250\241\346\235\277.js" "b/js/\346\250\241\346\235\277.js" index 26be864..0f52d33 100644 --- "a/js/\346\250\241\346\235\277.js" +++ "b/js/\346\250\241\346\235\277.js" @@ -62,7 +62,7 @@ var muban = { searchable:0, quickSearch:0, headers:{ - 'User-Agent':'MOBILE_UA', + 'User-Agent':'UC_UA', // "Cookie": "" }, class_parse:'.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;/(\\d+).html', @@ -72,7 +72,7 @@ var muban = { 推荐:'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href', double:true, // 推荐内容是否双层定位 一级:'.stui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href', - 二级:{"title":".stui-content__detail .title&&Text;.stui-content__detail p:eq(-2)&&Text","img":".stui-content__thumb .lazyload&&data-original","desc":".stui-content__detail p:eq(0)&&Text;.stui-content__detail p:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text","content":".detail&&Text","tabs":".stui-vodlist__head","lists":".stui-content__playlist:eq(#id) li"}, + 二级:{"title":".stui-content__detail .title&&Text;.stui-content__detail p:eq(-2)&&Text","img":".stui-content__thumb .lazyload&&data-original","desc":".stui-content__detail p:eq(0)&&Text;.stui-content__detail p:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text","content":".detail&&Text","tabs":".stui-vodlist__head h3","lists":".stui-content__playlist:eq(#id) li"}, 搜索:'#searchList li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text', } diff --git a/models/rules.db b/models/rules.db index 00295f738a693f4df850591aee0f43477b568894..75e02bf169bdac54207e27029da76e35a01c2610 100644 GIT binary patch delta 270 zcmZo@U}|V!njp;>I8nx#F>qtT5`Ja@jt!I91!P&cXK-xT*x13r=P$&@AX%=-;N$5O z=IK8V%nzdvP7jq2?+;uLu(J_h K2oJL?FVs-}lpWRp -- GitLab