From ec6344347e7924ff7db3536e7719287d8e5235b4 Mon Sep 17 00:00:00 2001 From: hjdhnx Date: Fri, 23 Sep 2022 15:41:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E9=A6=96=E5=9B=BE2?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E7=9A=84=E6=90=9C=E7=B4=A2=E5=AE=9A=E4=BD=8D?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E5=87=A0=E4=B8=AA=E7=9B=B8=E5=85=B3=E8=81=94?= =?UTF-8?q?=E7=9A=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "js/007\345\275\261\350\247\206.js" | 1 - "js/\344\272\272\344\272\272\345\275\261\350\247\206.js" | 1 - "js/\345\260\217\345\274\272\350\277\267.js" | 1 - "js/\346\250\241\346\235\277.js" | 6 +++--- "js/\347\211\233\351\251\254TV.js" | 1 - utils/htmlParser.py | 5 +++-- 6 files changed, 6 insertions(+), 9 deletions(-) diff --git "a/js/007\345\275\261\350\247\206.js" "b/js/007\345\275\261\350\247\206.js" index 54f4c29..2d3143c 100644 --- "a/js/007\345\275\261\350\247\206.js" +++ "b/js/007\345\275\261\350\247\206.js" @@ -4,5 +4,4 @@ var rule = Object.assign(muban.首图2,{ host:'https://www.007ts.me', url:'/channel/fyclass-fypage.html', searchUrl:'/search/**----------fypage---.html', - 搜索:'ul.stui-vodlist&&li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.text-muted:eq(-1)&&Text', }); \ No newline at end of file diff --git "a/js/\344\272\272\344\272\272\345\275\261\350\247\206.js" "b/js/\344\272\272\344\272\272\345\275\261\350\247\206.js" index 120943d..44be409 100644 --- "a/js/\344\272\272\344\272\272\345\275\261\350\247\206.js" +++ "b/js/\344\272\272\344\272\272\345\275\261\350\247\206.js" @@ -8,5 +8,4 @@ var rule = Object.assign(muban.首图2,{ // cate_exclude:'解说', play_parse:true, lazy:'', - 搜索:'ul.stui-vodlist__media&&li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.text-muted:eq(-1)&&Text', }); \ No newline at end of file diff --git "a/js/\345\260\217\345\274\272\350\277\267.js" "b/js/\345\260\217\345\274\272\350\277\267.js" index 7e5fb4c..d922187 100644 --- "a/js/\345\260\217\345\274\272\350\277\267.js" +++ "b/js/\345\260\217\345\274\272\350\277\267.js" @@ -9,5 +9,4 @@ title:'小强迷', host:'http://xqmi.top', url:'/index.php/vod/show/id/fyclass/page/fypage.html', searchUrl:'/index.php/vod/search/page/fypage/wd/**.html', -搜索:'li.stui-vodlist__item;a&&title;a&&data-original;.pic-text&&Text;a&&href' }); \ 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 af2945f..3758d92 100644 --- "a/js/\346\250\241\346\235\277.js" +++ "b/js/\346\250\241\346\235\277.js" @@ -77,9 +77,9 @@ var mubanDict = { // 模板字典 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 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', - 搜索:'ul.stui-vodlist&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text', - // 搜索:'ul.stui-vodlist__media&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text', + 搜索:'ul.stui-vodlist__media:eq(0) li,ul.stui-vodlist:eq(0) li,#searchList li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text', + 搜索1:'ul.stui-vodlist&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text', + 搜索2:'ul.stui-vodlist__media&&li;a&&title;.lazyload&&data-original;.text-muted&&Text;a&&href;.text-muted:eq(-1)&&Text', }, vfed:{ title:'', diff --git "a/js/\347\211\233\351\251\254TV.js" "b/js/\347\211\233\351\251\254TV.js" index 80c94e2..2af463e 100644 --- "a/js/\347\211\233\351\251\254TV.js" +++ "b/js/\347\211\233\351\251\254TV.js" @@ -6,5 +6,4 @@ var rule = Object.assign(muban.首图2,{ url:'/type/fyclass-fypage.html', searchUrl:'/vodsearch**/page/fypage.html', class_parse:'.stui-header__menu&&li;a&&Text;a&&href;.*/(.*?).html', - 搜索:'ul.stui-vodlist&&li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.text-muted:eq(-1)&&Text', }); \ No newline at end of file diff --git a/utils/htmlParser.py b/utils/htmlParser.py index 90c2aac..3bd51cd 100644 --- a/utils/htmlParser.py +++ b/utils/htmlParser.py @@ -70,8 +70,9 @@ class jsoup: parse = ' '.join([parse[i] if self.test(':eq|:lt|:gt', parse[i]) or i>=len(parse)-1 else f'{parse[i]}:eq(0)' for i in range(len(parse))]) # print(f'pdfa:{parse}') doc = pq(html) - # return [item.html() for item in doc(parse).items()] - return [str(item) for item in doc(parse).items()] + res = [str(item) for item in doc(parse).items()] + # print(len(res),res) + return res def pd(self,html,parse:str): return self.pdfh(html,parse,True) -- GitLab