diff --git "a/js/\345\226\265\345\226\265.js" "b/js/\345\226\265\345\226\265.js" new file mode 100644 index 0000000000000000000000000000000000000000..007cc71c6773f38d27c1b80efbcf106746ac1426 --- /dev/null +++ "b/js/\345\226\265\345\226\265.js" @@ -0,0 +1,18 @@ +var rule = { + title:'喵喵', + host:'https://www.2345ka.com', + // homeUrl:'/', + url:'/t/fyclass/fypage.html', + searchUrl:'/s/**/fypage.html', + headers:{ + 'User-Agent':'Mozilla/5.0 (Linux; U; Android 9; zh-CN; MI 9 Build/PKQ1.181121.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.5.5.1035 Mobile Safari/537.36' + }, + timeout:5000, + class_parse:'.bm-item-list a:gt(0):lt(7);a&&Text;a&&href;/(\\d+).html', + limit:10, + 推荐:'.movie-list-body;.movie-list-item;.movie-title&&Text;.movie-post-lazyload&&data-original;.movie-rating&&Text;a&&href', + double:true, // 推荐内容是否双层定位 + 一级:'.movie-list-body .movie-list-item;.movie-title&&Text;.Lazy&&data-original;.movie-rating&&Text;a&&href', + 二级:{"title":"h1.movie-title&&Text;.data:eq(1)&&Text","img":".poster img&&src","desc":".cr3.starLink&&Text","content":".detailsTxt&&Text","tabs":".play_source_tab a","lists":".content_playlist:eq(#id) a"}, + 搜索:'.vod-search-list;.movie-title&&Text;.Lazy&&data-original;.getop&&Text;a&&href;.getop:eq(-1)&&Text', +} \ No newline at end of file diff --git a/models/cms.py b/models/cms.py index 54b0d75267d6381f588d2d1f7958a297ef2c6ef1..5572f3afd0787b57c2eddc7b3f1f374799f9d74f 100644 --- a/models/cms.py +++ b/models/cms.py @@ -442,15 +442,17 @@ class CMS: if __name__ == '__main__': from utils import parser # js_path = f'js/玩偶姐姐.js' - js_path = f'js/555影视.js' + # js_path = f'js/555影视.js' + js_path = f'js/喵喵.js' ctx, js_code = parser.runJs(js_path) rule = ctx.eval('rule') cms = CMS(rule) print(cms.title) print(cms.homeContent()) - # print(cms.categoryContent('20',1)) + # print(cms.categoryContent('5',1)) # print(cms.categoryContent('latest',1)) - # print(cms.detailContent(['https://hongkongdollvideo.com/video/b22c7cb6df40a3c4.html'])) + # print(cms.detailContent(['https://www.2345ka.com/v/45499.html'])) + # print(cms.detailContent(1,['https://www.2345ka.com/v/78499.html'])) # cms.categoryContent('dianying',1) # print(cms.detailContent(['67391'])) - # print(cms.searchContent('斗罗大陆')) \ No newline at end of file + print(cms.searchContent('斗罗大陆')) \ No newline at end of file