发布新版本,drpy源全面支持hostJs,具体写法参考8k影视

This commit is contained in:
晚风拂柳颜 2023-06-07 14:43:03 +08:00
parent d668f49e6c
commit aa8d9ecac6
9 changed files with 306 additions and 235 deletions

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,7 @@ var rule = {
编码:'',//不填就默认utf-8
搜索编码:'',//不填则不编码默认都是按utf-8.可优先于全局编码属性.比如网页源码编码是gbk,这里可以指定utf-8搜索独立编码。多数情况这个属性不填或者填写gbk应对特殊的网站搜索
host:'',//网页的域名根,包含http头如 https://www,baidu.com
hostJS:'print(HOST);let html=request(HOST,{headers:{"User-Agent":PC_UA}});let src = jsp.pdfh(html,"ul&&li&&a&&href");print(src);HOST=src.replace("/index.php","")',//网页域名根动态抓取js代码。通过HOST=赋值
homeUrl:'/latest/',//网站的首页链接,可以是完整路径或者相对路径,用于分类获取和推荐获取 fyclass是分类标签 fypage是页数
url:'/fyclass/fypage.html[/fyclass/]',//网站的分类页面链接
detailUrl:'https://yanetflix.com/voddetail/fyid.html',//非必填,二级详情拼接链接,感觉没啥卵用

View File

@ -1,3 +1,11 @@
###### 2023/06/07
- [X] 后台管理增加p2p播放器
- [X] 3.9.43beta1 drpy新增hostJs属性可以用js动态捕捉网页根地址下面是一个示例
对应8K影视.js
```javascript
hostJs:'print(HOST);let html=request(HOST,{headers:{"User-Agent":PC_UA}});let src = jsp.pdfh(html,"ul&&li&&a&&href");print(src);HOST=src.replace("/index.php","")'
```
###### 2023/06/02
- [X] 3.9.42beta22 后台管理增加两套通用在线播放器地址

View File

@ -6,6 +6,7 @@ var rule={
title:'8K影视',
模板:'mxone5',
host:'http://www.8kvod.com',
hostJs:'print(HOST);let html=request(HOST,{headers:{"User-Agent":PC_UA}});let src = jsp.pdfh(html,"ul&&li&&a&&href");print(src);HOST=src.replace("/index.php","")',
// host:'http://www.xn--45q.top',
homeUrl:'/index.php',
url:'/t/fyclass-fypage/',

View File

@ -1 +1 @@
{"showTime":89200000,"txt":"drpy 3.9.42beta25 -道长"}
{"showTime":89200000,"txt":"drpy 3.9.43beta1 -道长"}

View File

@ -1 +1 @@
3.9.42beta27
3.9.43beta1

View File

@ -55,7 +55,7 @@ function pre(){
}
let rule = {};
const VERSION = 'drpy1 3.9.41beta14 20230428';
const VERSION = 'drpy1 3.9.43beta1 20230607';
/**
* 1.影魔的jinjia2引擎不支持 {{fl}}对象直接渲染 (有能力解决的话尽量解决下支持对象直接渲染字符串转义,如果加了|safe就不转义)[影魔牛逼最新的文件发现这问题已经解决了]
* Array.prototype.append = Array.prototype.push; 这种js执行后有毛病,for in 循环列表会把属性给打印出来 (这个大毛病需要重点排除一下)

View File

@ -41,7 +41,7 @@ function pre(){
let rule = {};
let vercode = typeof(pdfl) ==='function'?'drpy2.1':'drpy2';
const VERSION = vercode+' 3.9.41beta14 20230428';
const VERSION = vercode+' 3.9.43beta1 20230607';
/**
* 1.影魔的jinjia2引擎不支持 {{fl}}对象直接渲染 (有能力解决的话尽量解决下支持对象直接渲染字符串转义,如果加了|safe就不转义)[影魔牛逼最新的文件发现这问题已经解决了]
* Array.prototype.append = Array.prototype.push; 这种js执行后有毛病,for in 循环列表会把属性给打印出来 (这个大毛病需要重点排除一下)

View File

@ -229,7 +229,10 @@ function request(url,obj){
}else{
new_obj = obj||{}
}
if(!new_obj||!new_obj.headers||(!new_obj.headers['User-Agent']&&!new_obj.headers['user-agent'])){
if(!new_obj||!new_obj.headers){
new_obj.headers = {};
}
if(!new_obj.headers['User-Agent']&&!new_obj.headers['user-agent']){
new_obj.headers['User-Agent'] = MOBILE_UA;
}
// delete new_obj.headers['Referer'];