diff --git a/controllers/cms.py b/controllers/cms.py index 190546994d759892c540310530d88e0a8dcb4058..04c4dada09e5b668d7a1d5790bcfc09f2ee5ea0b 100644 --- a/controllers/cms.py +++ b/controllers/cms.py @@ -765,6 +765,31 @@ class CMS: vod_play_from = '$$$' playFrom = [] + if p.get('重定向') and str(p['重定向']).startswith('js:'): + headers['Referer'] = getHome(url) + py_ctx.update({ + 'input': url, + 'html': html, + 'TYPE': 'detail', # 海阔js环境标志 + 'cateID': fyclass, # 当前分类 + 'fetch_params': {'headers': headers, 'timeout': self.d.timeout, 'encoding': self.d.encoding}, + 'd': self.d, + 'getParse': self.d.getParse, + 'saveParse': self.d.saveParse, + 'jsp': jsp, 'setDetail': setDetail, + }) + ctx = py_ctx + # print(ctx) + rcode = p['重定向'].replace('js:', '', 1) + jscode = getPreJs() + rcode + # print(jscode) + loader, _ = runJScode(jscode, ctx=ctx) + # print(loader.toString()) + logger.info(f'开始执行二级重定向代码:{rcode}') + html = loader.eval('html') + if isinstance(vod, JsObjectWrapper): + html = str(html) + if p.get('tabs'): # print(p['tabs'].split(';')[0]) vodHeader = pdfa(html,p['tabs'].split(';')[0]) diff --git a/js/version.txt b/js/version.txt index 8a0feb98cae9c1163f0caff989bc79a7e33c2a7e..5141b615b4b2331874318b0dbdcb315ec6a77922 100644 --- a/js/version.txt +++ b/js/version.txt @@ -1 +1 @@ -3.4.3 \ No newline at end of file +3.4.4 \ 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" new file mode 100644 index 0000000000000000000000000000000000000000..7ce1dbff3a60f93b3dbfc2e03a879a32e4e5f58a --- /dev/null +++ "b/js/\345\260\217\345\274\272\350\277\267.js" @@ -0,0 +1,15 @@ +muban.首图2.二级.content = '.stui-content__desc&&Text'; +muban.首图2.二级.title = '.stui-content__detail&&h3&&Text;.stui-content__detail&&p:eq(1)&&Text;'; +muban.首图2.二级.重定向='js:let url = jsp.pd(html,".playbtn&&a&&href");log(url);html = request(url)'; +muban.首图2.二级.tabs='.t-ul&&li'; +muban.首图2.二级.lists='.stui-content__playlist:eq(#id)&&li'; + +var rule = Object.assign(muban.首图2,{ +title:'小强迷', +host:'http://xqmi.top', +url:'/index.php/vod/show/id/fyclass/page/fypage.html', +searchUrl:'/index.php/vod/search/page/fypage/wd/**.html', +searchable:1, +quickSearch:1, +搜索:'li.stui-vodlist__item;a&&title;a&&data-original;.pic-text&&Text;a&&href' +}); \ No newline at end of file diff --git a/models/rules.db b/models/rules.db index 55128d684d0163210f7a53c36e8b78434920dd5d..7f162051936025886c761008807a1aafedec958d 100644 Binary files a/models/rules.db and b/models/rules.db differ diff --git a/readme.md b/readme.md index 5d45f52933ea0d020a47a777059cc718cf89451a..a2699b27cb66724bc65d89c6556191638bc12401 100644 --- a/readme.md +++ b/readme.md @@ -46,11 +46,13 @@ [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/10 +- [X] 1.升级至3.4.4.增加小强迷源,增加二级重定向属性(提供重定向后的源码,让代码重新取重定向过后的线路和播放列表) ###### 2022/09/09 - [X] 1.增加西瓜源,修复一级不支持lazy的bug - [X] 2.兄弟们dockerhub没法push镜像不知道咋回事,3.4.1的镜像自己用docker目录下的文件build吧 - [X] 3.版本升至3.4.2,增加py源支持,放txt/py目录即可,特别鸣谢Pyramid开发者及xiaoya liu提供的技术和源 -- [X] 3.版本升至3.4.3,增加了强制升级功能(本地增量覆盖大法) +- [X] 4.版本升至3.4.3,增加了强制升级功能(本地增量覆盖大法) ###### 2022/09/08 - [X] 1.升级到3.2.9,支持自动合并自定义用户配置(内置t4测试源) - [X] 2.升级到3.3.0,增加奇珍异兽源