提交 45049da0 编写于 作者: H hjdhnx

升级3.9.5

上级 40422011
......@@ -40,7 +40,7 @@ MAX_CONTENT_LENGTH = 1 * 1024 * 100 # 100 kB
LIVE_MODE = 0 # 0 本地 1外网
# LIVE_URL = 'https://gitcode.net/bd/v/-/raw/main/live/zb.txt' # 初始化外网直播地址(后续在管理界面改)
LIVE_URL = 'https://raw.fastgit.org/zhanghong1983/TVBOXZY/main/TV/live.txt' # 初始化外网直播地址(后续在管理界面改)
CATE_EXCLUDE = '首页|留言|APP|下载|资讯|新闻|动态|明星|专题|最新|排行' # 动态分类过滤
CATE_EXCLUDE = '首页|留言|APP|下载|资讯|新闻|动态|明星|专题|最新|排行|解析' # 动态分类过滤
TAB_EXCLUDE = '猜你|喜欢|APP|下载|剧情|简介' # 动态线路名过滤
# {% if config.WALL_PAPER %}"wallpaper":"{{ config.WALL_PAPER }}",{% endif %}
SEARCH_TIMEOUT = 5000 # 聚搜超时毫秒
......
无法预览此类型文件
var rule={
title:'ddys',
host:'https://ddys.tv',
// homeUrl:'/',
url:'https://ddys.tv/category/fyclass/page/fypage/',
searchUrl:'/search.html?wd=**',
searchable:2,//是否启用全局搜索,
quickSearch:0,//是否启用快速搜索,
filterable:0,//是否启用分类筛选,
headers:{//网站的请求头,完整支持所有的,常带ua和cookies
'User-Agent':'MOBILE_UA',
// "Cookie": "searchneed=ok"
},
class_name:'电影&剧集&动画',
class_url:'movie&airing&anime',
cate_exclude:'解析|动态',
play_parse:true,
lazy:'',
limit:6,
//推荐:'.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
double:true, // 推荐内容是否双层定位
一级:'.post-box-list&&article;a:eq(-1)&&Text;.post-box-image&&style;a:eq(0)&&Text;a:eq(-1)&&href',
二级:{"title":"h1&&Text;.content-rt&&p:eq(0)&&Text","img":".img&&img&&data-src","desc":".content-rt&&p:eq(1)&&Text;.content-rt&&p:eq(2)&&Text;.content-rt&&p:eq(3)&&Text;.content-rt&&p:eq(4)&&Text;.content-rt&&p:eq(5)&&Text","content":".zkjj_a&&Text","tabs":".py-tabs&&option","lists":".player:eq(#id) li"},
搜索:'.sr_lists&&ul&&li;h3&&Text;img&&data-src;.int&&p:eq(0)&&Text;a&&href',
}
\ No newline at end of file
3.9.4
\ No newline at end of file
3.9.5
\ No newline at end of file
var rule={
var rule = Object.assign(muban.短视,{
title:'凌云影视',
host:'https://www.lingyun.in',
// searchUrl:'/v_search/**----------fypage---.html',
url:'/channel/fyclass-fypage.html',
headers:{
'User-Agent':'MOBILE_UA'
},
timeout:5000,
class_parse:'.over-auto li;a&&Text;a&&href;.*/(.*?).html',
cate_exclude:'解析',
limit:40,
play_parse:true,
lazy:'',
推荐:'ul.pic-list.pic-list-nth;li;a&&title;img&&data-src;.s1&&Text;a&&href',
double:true,
一级:'ul.pic-list.clearfix&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
二级:{"title":".content-rt&&h1&&Text;.content-rt&&p:eq(0)&&Text","img":".img&&img&&data-src","desc":".content-rt&&p:eq(2)&&Text;.content-rt&&p:eq(3)&&Text","content":".movie-introduce&&.sqjj_a&&Text","tabs":".py-tabs&&option","lists":"ul.player:eq(#id)&&li"},
// 搜索:'.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
searchable:0,//是否启用全局搜索,
};
\ No newline at end of file
});
\ No newline at end of file
......@@ -169,7 +169,30 @@ vfed:{
quickSearch:0,//是否启用快速搜索,
filterable:0,//是否启用分类筛选,
},
短视:{
title:'',
host:'',
// homeUrl:'/',
url:'/channel/fyclass-fypage.html',
searchUrl:'/search.html?wd=**',
searchable:2,//是否启用全局搜索,
quickSearch:0,//是否启用快速搜索,
filterable:0,//是否启用分类筛选,
headers:{//网站的请求头,完整支持所有的,常带ua和cookies
'User-Agent':'MOBILE_UA',
// "Cookie": "searchneed=ok"
},
class_parse:'.menu_bottom ul li;a&&Text;a&&href;.*/(.*?).html',
cate_exclude:'解析|动态',
play_parse:true,
lazy:'',
limit:6,
推荐:'.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
double:true, // 推荐内容是否双层定位
一级:'.pic-list&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
二级:{"title":"h1&&Text;.content-rt&&p:eq(0)&&Text","img":".img&&img&&data-src","desc":".content-rt&&p:eq(1)&&Text;.content-rt&&p:eq(2)&&Text;.content-rt&&p:eq(3)&&Text;.content-rt&&p:eq(4)&&Text;.content-rt&&p:eq(5)&&Text","content":".zkjj_a&&Text","tabs":".py-tabs&&option","lists":".player:eq(#id) li"},
搜索:'.sr_lists&&ul&&li;h3&&Text;img&&data-src;.int&&p:eq(0)&&Text;a&&href',
}
};
var muban = JSON.parse(JSON.stringify(mubanDict));
......
muban.首图2.二级.tabs = '.stui-pannel__head.bottom-line.active.clearfix h3';
muban.首图2.二级.content = '.stui-content__desc&&Text';
var rule = Object.assign(muban.首图2,{
title:'秋霞',
host:'https://www.7xiady.cc',
url:'/type/fyclass-fypage/',
class_parse:'.stui-header__menu li;a&&Text;a&&href;/type/(.*?)/',
searchUrl:'/search/**----------fypage---.html',
搜索:'ul.stui-vodlist&&li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
});
\ No newline at end of file
......@@ -411,6 +411,24 @@ function urljoin(fromPath, nowPath) {
// }
}
var urljoin2 = urljoin;
/**
* pdfh原版优化,能取style属性里的图片链接
* @param html 源码
* @param parse 解析表达式
* @returns {string|*}
*/
function pdfh2(html,parse){
let result = pdfh(html,parse);
let option = parse.includes('&&')?parse.split('&&').slice(-1)[0]:parse.split(' ').slice(-1)[0];
if(/style/.test(option.toLowerCase())&&/url\(/.test(result)){
try {
result = result.match(/url\((.*?)\)/)[1];
}catch (e) {}
}
return result
}
/**
* 重写pd方法-增加自动urljoin(没法重写,改个名继续骗)
* @param html
......@@ -419,7 +437,7 @@ var urljoin2 = urljoin;
* @returns {*}
*/
function pD(html,parse,uri){
let ret = pdfh(html,parse);
let ret = pdfh2(html,parse);
if(typeof(uri)==='undefined'||!uri){
uri = '';
}
......@@ -437,7 +455,7 @@ function pD(html,parse,uri){
const parseTags = {
jsp:{
pdfh:pdfh,
pdfh:pdfh2,
pdfa:pdfa,
pd:pD,
},
......@@ -540,6 +558,11 @@ const parseTags = {
}
else {
result = $(ret).attr(option);
if(/style/.test(option.toLowerCase())&&/url\(/.test(result)){
try {
result = result.match(/url\((.*?)\)/)[1];
}catch (e) {}
}
}
if (result && base_url && DOM_CHECK_ATTR.test(option)) {
if (/http/.test(result)) {
......
此差异已折叠。
......@@ -46,7 +46,11 @@
[golang最好的js引擎-otto](https://github.com/robertkrimen/otto)
[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)
[获取本地设备信息](https://m.jb51.net/article/140716.htm)
###### 2022/10/13
- [X] 3.9.5修复凌云影视源并增加短视模板
- [X] 增加秋霞影视,ddys等半成品(优化代码兼容取style属性的情况自动提取链接)
- [X] 更新drpy.js,drpy.min.js等本地js运行支持库
###### 2022/10/12
- [X] js模式2动态配置链接支持多种壳子
- [X] 增加/lives?path=base/live.txt路由
......
......@@ -33,7 +33,6 @@ class jsoup:
else:
parse = parse[0] if self.test(':eq|:lt|:gt|#',parse[0]) else f'{parse[0]}:eq(0)'
# FIXME 暂时不支持jsonpath那样的|| 分割取或属性
if option:
# print(f'parse:{parse}=>(option:{option})')
ret = doc(parse)
......@@ -45,6 +44,11 @@ class jsoup:
ret = ret.html()
else:
ret = ret.attr(option) or ''
if option.lower().find('style')>-1 and ret.find('url(')>-1:
try:
ret = re.search('url\((.*?)\)',ret,re.M|re.S).groups()[0]
except:
pass
if ret and add_url and option in ['url','src','href','data-original','data-src']:
if 'http' in ret:
ret = ret[ret.find('http'):]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册