提交 61407aff 编写于 作者: H hjdhnx

增加了二级重定向功能

上级 f0096d93
......@@ -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])
......
3.4.3
\ No newline at end of file
3.4.4
\ No newline at end of file
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
无法预览此类型文件
......@@ -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,增加奇珍异兽源
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册