mirror of https://github.com/alantang1977/X
Update ng_open.js
This commit is contained in:
parent
7e93b010b9
commit
78b11efd95
378
js/ng_open.js
378
js/ng_open.js
|
@ -1,213 +1,189 @@
|
||||||
import { Crypto, jinja2, _ } from './lib/cat.js';
|
// 注入全局方法 (仅支持tvbox的js1以及c#版drpy的js0,暂不支持drpy官方py版的js0)
|
||||||
|
// 注入全局方法 (仅支持tvbox的js1以及c#版drpy的js0,暂不支持drpy官方py版的js0)
|
||||||
let key = '南瓜影视';
|
// 注入全局方法 (仅支持tvbox的js1以及c#版drpy的js0,暂不支持drpy官方py版的js0)
|
||||||
let HOST = 'http://ys.changmengyun.com';
|
globalThis.getHeaders= function(input){
|
||||||
let siteKey = '';
|
|
||||||
let siteType = 0;
|
|
||||||
let MOBILE_UA = 'okhttp/4.6.0'
|
|
||||||
|
|
||||||
async function request(reqUrl) {
|
|
||||||
let t = new Date().getTime().toString();
|
let t = new Date().getTime().toString();
|
||||||
let res = await req(reqUrl, {
|
let headers = {
|
||||||
method: 'get',
|
'version_name': '1.0.6',
|
||||||
headers: {
|
'version_code': '6',
|
||||||
'version_name': '1.0.6',
|
'package_name': 'com.app.nanguatv',
|
||||||
'version_code': '6',
|
'sign': md5('c431ea542cee9679#uBFszdEM0oL0JRn@' + t).toUpperCase(),
|
||||||
'package_name': 'com.app.nanguatv',
|
'imei': 'c431ea542cee9679',
|
||||||
'sign': Crypto.MD5('c431ea542cee9679#uBFszdEM0oL0JRn@' + t).toString().toLowerCase(),
|
'timeMillis': t,
|
||||||
'imei': 'c431ea542cee9679',
|
'User-Agent': 'okhttp/4.6.0'
|
||||||
'timeMillis': t,
|
};
|
||||||
'User-Agent': MOBILE_UA
|
return headers
|
||||||
},
|
|
||||||
});
|
|
||||||
return res.content;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function init(cfg) {
|
var rule = {
|
||||||
siteKey = cfg.skey;
|
title:'南瓜影视',
|
||||||
siteType = cfg.stype;
|
host:'http://ys.changmengyun.com',
|
||||||
}
|
homeUrl:'/api.php/provide/vod_rank?app=ylys&sort_type=month&imei=c431ea542cee9679&id=2&page=1',
|
||||||
|
url:'/api.php/provide/vod_list?app=ylys&id=fyclassfyfilter&page=fypage&imei=c431ea542cee9679',
|
||||||
async function home(filter) {
|
detailUrl:'/api.php/provide/vod_detail?app=ylys&imei=c431ea542cee9679&id=fyid',
|
||||||
let data = JSON.parse(await request(HOST + '/api.php/provide/home_nav'));
|
searchUrl:'/api.php/provide/search_result_more?app=ylys&video_name=**&pageSize=20&tid=0&imei=c431ea542cee9679&page=fypage',
|
||||||
let classes = [];
|
searchable:2,
|
||||||
for (const key in data) {
|
quickSearch:0,
|
||||||
if (data[key].name != '精选')
|
filterable:1,
|
||||||
classes.push({
|
filter_url:'&area={{fl.area}}&year={{fl.year}}&type={{fl.class}}&total={{fl.total or "状态"}}&order={{fl.by or "新上线"}}',
|
||||||
type_id: data[key].id,
|
filter:{
|
||||||
type_name: data[key].name,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
let filterObj = {
|
|
||||||
"2":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"国产剧","v":"国产剧"},{"n":"港台剧","v":"港台剧"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"地区"},{"n":"内地","v":"内地"},{"n":"香港地区","v":"香港地区"},{"n":"台湾地区","v":"台湾地区"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":"年份"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"好评榜","v":"好评榜"},{"n":"新上线","v":"新上线"}]}],
|
"2":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"国产剧","v":"国产剧"},{"n":"港台剧","v":"港台剧"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"地区"},{"n":"内地","v":"内地"},{"n":"香港地区","v":"香港地区"},{"n":"台湾地区","v":"台湾地区"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":"年份"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"好评榜","v":"好评榜"},{"n":"新上线","v":"新上线"}]}],
|
||||||
"1":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"动作片","v":"动作片"},{"n":"喜剧片","v":"喜剧片"},{"n":"爱情片","v":"爱情片"},{"n":"科幻片","v":"科幻片"},{"n":"恐怖片","v":"恐怖片"},{"n":"剧情片","v":"剧情片"},{"n":"战争片","v":"战争片"},{"n":"惊悚片","v":"惊悚片"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"地区"},{"n":"华语","v":"华语"},{"n":"香港地区","v":"香港地区"},{"n":"美国","v":"美国"},{"n":"欧洲","v":"欧洲"},{"n":"韩国","v":"韩国"},{"n":"日本","v":"日本"},{"n":"台湾地区","v":"台湾地区"},{"n":"泰国","v":"泰国"},{"n":"台湾地区","v":"台湾地区"},{"n":"印度","v":"印度"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":"年份"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"好评榜","v":"好评榜"},{"n":"新上线","v":"新上线"}]}],
|
"1":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"动作片","v":"动作片"},{"n":"喜剧片","v":"喜剧片"},{"n":"爱情片","v":"爱情片"},{"n":"科幻片","v":"科幻片"},{"n":"恐怖片","v":"恐怖片"},{"n":"剧情片","v":"剧情片"},{"n":"战争片","v":"战争片"},{"n":"惊悚片","v":"惊悚片"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"地区"},{"n":"华语","v":"华语"},{"n":"香港地区","v":"香港地区"},{"n":"美国","v":"美国"},{"n":"欧洲","v":"欧洲"},{"n":"韩国","v":"韩国"},{"n":"日本","v":"日本"},{"n":"台湾地区","v":"台湾地区"},{"n":"泰国","v":"泰国"},{"n":"台湾地区","v":"台湾地区"},{"n":"印度","v":"印度"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":"年份"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"好评榜","v":"好评榜"},{"n":"新上线","v":"新上线"}]}],
|
||||||
"4":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"国产漫","v":"国产漫"},{"n":"欧美漫","v":"欧美漫"},{"n":"日韩漫","v":"日韩漫"},{"n":"港台漫","v":"港台漫"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"地区"},{"n":"中国大陆","v":"中国大陆"},{"n":"日本","v":"日本"},{"n":"韩国","v":"韩国"},{"n":"欧美","v":"欧美"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":"年份"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"新上线","v":"新上线"}]},{"key":"total","name":"状态","value":[{"n":"全部","v":"状态"},{"n":"连载","v":"连载"},{"n":"完结","v":"完结"}]}],
|
"4":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"国产漫","v":"国产漫"},{"n":"欧美漫","v":"欧美漫"},{"n":"日韩漫","v":"日韩漫"},{"n":"港台漫","v":"港台漫"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"地区"},{"n":"中国大陆","v":"中国大陆"},{"n":"日本","v":"日本"},{"n":"韩国","v":"韩国"},{"n":"欧美","v":"欧美"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":"年份"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"新上线","v":"新上线"}]},{"key":"total","name":"状态","value":[{"n":"全部","v":"状态"},{"n":"连载","v":"连载"},{"n":"完结","v":"完结"}]}],
|
||||||
"3":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"大陆","v":"大陆"},{"n":"港台","v":"港台"},{"n":"日韩","v":"日韩"},{"n":"欧美","v":"欧美"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"地区"},{"n":"内地","v":"内地"},{"n":"港台","v":"港台"},{"n":"日韩","v":"日韩"},{"n":"欧美","v":"欧美"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":"年份"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"新上线","v":"新上线"}]}],
|
"3":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"大陆","v":"大陆"},{"n":"港台","v":"港台"},{"n":"日韩","v":"日韩"},{"n":"欧美","v":"欧美"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"地区"},{"n":"内地","v":"内地"},{"n":"港台","v":"港台"},{"n":"日韩","v":"日韩"},{"n":"欧美","v":"欧美"},{"n":"其它","v":"其它"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":"年份"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"新上线","v":"新上线"}]}],
|
||||||
"46":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"日韩剧","v":"日韩剧"},{"n":"欧美剧","v":"欧美剧"},{"n":"海外剧","v":"海外剧"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"地区"},{"n":"韩国","v":"韩国"},{"n":"美剧","v":"美剧"},{"n":"日本","v":"日本"},{"n":"泰国","v":"泰国"},{"n":"英国","v":"英国"},{"n":"新加坡","v":"新加坡"},{"n":"其他","v":"其他"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":"年份"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"好评榜","v":"好评榜"},{"n":"新上线","v":"新上线"}]}]
|
"46":[{"key":"class","name":"类型","value":[{"n":"全部","v":"类型"},{"n":"日韩剧","v":"日韩剧"},{"n":"欧美剧","v":"欧美剧"},{"n":"海外剧","v":"海外剧"}]},{"key":"area","name":"地区","value":[{"n":"全部","v":"地区"},{"n":"韩国","v":"韩国"},{"n":"美剧","v":"美剧"},{"n":"日本","v":"日本"},{"n":"泰国","v":"泰国"},{"n":"英国","v":"英国"},{"n":"新加坡","v":"新加坡"},{"n":"其他","v":"其他"}]},{"key":"year","name":"年份","value":[{"n":"全部","v":"年份"},{"n":"2023","v":"2023"},{"n":"2022","v":"2022"},{"n":"2021","v":"2021"},{"n":"2020","v":"2020"},{"n":"2019","v":"2019"},{"n":"2018","v":"2018"},{"n":"2017","v":"2017"},{"n":"2016","v":"2016"},{"n":"2015","v":"2015"},{"n":"10年代","v":"10年代"},{"n":"00年代","v":"00年代"},{"n":"90年代","v":"90年代"},{"n":"80年代","v":"80年代"}]},{"key":"by","name":"排序","value":[{"n":"热播榜","v":"热播榜"},{"n":"好评榜","v":"好评榜"},{"n":"新上线","v":"新上线"}]}]
|
||||||
};
|
},
|
||||||
return JSON.stringify({
|
headers:{
|
||||||
class: classes,
|
"User-Agent":"okhttp/4.6.0"
|
||||||
filters: filterObj,
|
},
|
||||||
});
|
timeout:5000,
|
||||||
}
|
class_name:'电视剧&电影&动漫&综艺&海外精选', // /api.php/provide/home_nav
|
||||||
|
class_url:'2&1&4&3&46',
|
||||||
async function homeVod() {
|
limit:20,
|
||||||
let data = JSON.parse(await request(HOST + '/api.php/provide/vod_rank?app=ylys&sort_type=month&imei=c431ea542cee9679&id=2&page=1'));
|
play_parse:true,
|
||||||
let videos = [];
|
lazy:`js:
|
||||||
data.forEach(function(it) {
|
try {
|
||||||
videos.push({
|
function getvideo(url) {
|
||||||
vod_id: it.id,
|
let jData = JSON.parse(request(url, {
|
||||||
vod_name: it.name,
|
headers: getHeaders(url)
|
||||||
vod_pic: it.img,
|
}));
|
||||||
vod_remarks: it.remarks,
|
if (jData.code == 1) {
|
||||||
});
|
return jData.data.url
|
||||||
});
|
} else {
|
||||||
return JSON.stringify({
|
return 'http://43.154.104.152:1234/jhapi/cs.php?url=' + url.split('=')[1]
|
||||||
list: videos,
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async function category(tid, pg, filter, extend) {
|
|
||||||
if (pg <= 0 || typeof(pg) == 'undefined') pg = 1;
|
|
||||||
let reqUrl = HOST + '/api.php/provide/vod_list?app=ylys&id=' + tid + '&page=' + pg + '&imei=c431ea542cee9679&';
|
|
||||||
reqUrl += jinja2('area={{ext.area}}&year={{ext.year}}&type={{ext.class}}&total={{ext.total}}&order={{ext.by}}', { ext: extend });
|
|
||||||
// let data = JSON.parse(await request(reqUrl));
|
|
||||||
let data = JSON.parse(await request(reqUrl)).list;
|
|
||||||
let videos = [];
|
|
||||||
data.forEach(function(it) {
|
|
||||||
videos.push({
|
|
||||||
vod_id: it.id,
|
|
||||||
vod_name: it.name,
|
|
||||||
vod_pic: it.img,
|
|
||||||
vod_remarks: it.remarks,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
let pgChk = JSON.parse(await request(HOST + '/api.php/provide/vod_list?app=ylys&id=' + tid + '&page=' + (parseInt(pg) + 1) + '&imei=c431ea542cee9679&')).msg;
|
|
||||||
const pgCount = (pgChk == 'ok') ? parseInt(pg) + 1 : parseInt(pg);
|
|
||||||
return JSON.stringify({
|
|
||||||
page: parseInt(pg),
|
|
||||||
pagecount: pgCount,
|
|
||||||
limit: 20,
|
|
||||||
total: 20 * pgCount,
|
|
||||||
list: videos,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async function detail(id) {
|
|
||||||
let data = JSON.parse(await request(HOST + '/api.php/provide/vod_detail?app=ylys&imei=c431ea542cee9679&id=' + id)).data;
|
|
||||||
let vod = {
|
|
||||||
vod_id: data.id,
|
|
||||||
vod_name: data.name,
|
|
||||||
vod_pic: data.img,
|
|
||||||
type_name: data.type,
|
|
||||||
vod_year: data.year,
|
|
||||||
vod_remarks: '更新至: ' + data.msg + ' / 评分: ' + data.score,
|
|
||||||
vod_content: stripHtmlTag(data.info),
|
|
||||||
};
|
|
||||||
let episodes = data.player_info;
|
|
||||||
let playlist = {};
|
|
||||||
episodes.forEach(function(it) {
|
|
||||||
let playurls = it.video_info;
|
|
||||||
playurls.forEach(function(playurl) {
|
|
||||||
let source = it.show;
|
|
||||||
let t = formatPlayUrl(vod.vod_name, playurl.name);
|
|
||||||
if (t.length == 0) t = playurl.name.trim();
|
|
||||||
if (!playlist.hasOwnProperty(source)) {
|
|
||||||
playlist[source] = [];
|
|
||||||
}
|
}
|
||||||
playlist[source].push(t + '$' + playurl.url);
|
if (/,/.test(input)) {
|
||||||
});
|
let mjurl = input.split(',')[1]
|
||||||
});
|
let videoUrl = getvideo(mjurl);
|
||||||
vod.vod_play_from = _.keys(playlist).join('$$$');
|
input = {
|
||||||
let urls = _.values(playlist);
|
jx: 0,
|
||||||
let vod_play_url = [];
|
url: videoUrl,
|
||||||
urls.forEach(function(it) {
|
parse: 0,
|
||||||
vod_play_url.push(it.join('#'));
|
header: JSON.stringify({
|
||||||
});
|
'user-agent': 'Lavf/58.12.100'
|
||||||
vod.vod_play_url = vod_play_url.join('$$$');
|
})
|
||||||
return JSON.stringify({
|
}
|
||||||
list: [vod],
|
} else {
|
||||||
});
|
let videoUrl = getvideo(input);
|
||||||
}
|
if (/jhapi/.test(videoUrl)) {
|
||||||
|
videoUrl = getvideo(videoUrl);
|
||||||
async function play(flag, id, flags) {
|
input = {
|
||||||
try {
|
jx: 0,
|
||||||
if (id.indexOf('m3u8') != -1) {
|
url: videoUrl,
|
||||||
let mjurl = id.split('url=')[1]
|
parse: 0,
|
||||||
return JSON.stringify({
|
header: JSON.stringify({
|
||||||
parse: 0,
|
'user-agent': 'Lavf/58.12.100'
|
||||||
url: mjurl,
|
})
|
||||||
});
|
}
|
||||||
} else if (id.indexOf(',') != -1) {
|
} else {
|
||||||
let mjurl = id.split(',')[1]
|
input = {
|
||||||
let jData = JSON.parse(await request(mjurl));
|
jx: 0,
|
||||||
return JSON.stringify({
|
url: videoUrl,
|
||||||
parse: 0,
|
parse: 0
|
||||||
url: jData.data.url,
|
}
|
||||||
});
|
}
|
||||||
} else {
|
}
|
||||||
let mjurl = 'http://43.154.104.152:1234/jhapi/cs.php?url=' + id.split('url=')[1]
|
} catch (e) {
|
||||||
let jData = JSON.parse(await request(mjurl));
|
log(e.toString())
|
||||||
return JSON.stringify({
|
|
||||||
parse: 0,
|
|
||||||
url: jData.data.url,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
`,
|
||||||
return JSON.stringify({
|
推荐:`js:
|
||||||
parse: 0,
|
var d = [];
|
||||||
url: id,
|
let html = request(input, {
|
||||||
|
headers: getHeaders(input)
|
||||||
});
|
});
|
||||||
}
|
html = JSON.parse(html);
|
||||||
}
|
html.forEach(function(it) {
|
||||||
|
d.push({
|
||||||
async function search(wd, quick, pg) {
|
title: it.name,
|
||||||
if (pg <= 0 || typeof(pg) == 'undefined') pg = 1;
|
img: it.img,
|
||||||
let data = JSON.parse(await request(HOST + '/api.php/provide/search_result_more?app=ylys&video_name=' + wd + '&pageSize=20&tid=0&imei=c431ea542cee9679&page=' + pg, 'okhttp/4.6.0')).data;
|
desc: it.remarks,
|
||||||
let videos = [];
|
url: it.id
|
||||||
data.forEach(function(it) {
|
})
|
||||||
videos.push({
|
|
||||||
vod_id: it.id,
|
|
||||||
vod_name: it.video_name,
|
|
||||||
vod_pic: it.img,
|
|
||||||
vod_remarks: it.qingxidu + '/' + it.category,
|
|
||||||
});
|
});
|
||||||
});
|
setResult(d);
|
||||||
let pgChk = JSON.parse(await request(HOST + '/api.php/provide/search_result_more?app=ylys&video_name=' + wd + '&pageSize=20&tid=0&imei=c431ea542cee9679&page=' + (parseInt(pg) + 1), 'okhttp/4.6.0')).msg;
|
`,
|
||||||
const pgCount = (pgChk == 'ok') ? parseInt(pg) + 1 : parseInt(pg);
|
一级:`js:
|
||||||
return JSON.stringify({
|
var d = [];
|
||||||
page: parseInt(pg),
|
let html = request(input, {
|
||||||
pagecount: pgCount,
|
headers: getHeaders(input)
|
||||||
limit: 20,
|
});
|
||||||
total: 20 * pgCount,
|
html = JSON.parse(html);
|
||||||
list: videos,
|
html.list.forEach(function(it) {
|
||||||
});
|
d.push({
|
||||||
}
|
title: it.name,
|
||||||
|
img: it.img,
|
||||||
function stripHtmlTag(src) {
|
desc: it.msg,
|
||||||
return src
|
url: it.id
|
||||||
.replace(/<\/?[^>]+(>|$)/g, '')
|
})
|
||||||
.replace(/&.{1,5};/g, '')
|
});
|
||||||
.replace(/\s{2,}/g, ' ');
|
setResult(d);
|
||||||
}
|
`,
|
||||||
|
二级:`js:
|
||||||
function formatPlayUrl(src, name) {
|
var d = [];
|
||||||
return name
|
VOD = {
|
||||||
.trim()
|
vod_id: input.split('id=')[1]
|
||||||
.replaceAll(src, '')
|
};
|
||||||
.replace(/<|>|《|》/g, '')
|
try {
|
||||||
.replace(/\$|#/g, ' ')
|
let html = request(input, {
|
||||||
.trim();
|
headers: getHeaders(input)
|
||||||
}
|
});
|
||||||
|
html = JSON.parse(html);
|
||||||
export function __jsEvalReturn() {
|
let node = html.data;
|
||||||
return {
|
VOD = {
|
||||||
init: init,
|
vod_name: node['name'],
|
||||||
home: home,
|
vod_pic: node['img'],
|
||||||
homeVod: homeVod,
|
type_name: node['type'],
|
||||||
category: category,
|
vod_year: node['year'],
|
||||||
detail: detail,
|
vod_remarks: '更新至: ' + node['msg'] + ' / 评分: ' + node['score'],
|
||||||
play: play,
|
vod_content: node['info'].strip()
|
||||||
search: search,
|
};
|
||||||
};
|
let episodes = node.player_info;
|
||||||
|
let playMap = {};
|
||||||
|
if (typeof play_url === 'undefined') {
|
||||||
|
var play_url = ''
|
||||||
|
}
|
||||||
|
episodes.forEach(function(ep) {
|
||||||
|
let playurls = ep['video_info'];
|
||||||
|
playurls.forEach(function(playurl) {
|
||||||
|
let source = ep['show'];
|
||||||
|
if (!playMap.hasOwnProperty(source)) {
|
||||||
|
playMap[source] = []
|
||||||
|
}
|
||||||
|
playMap[source].append(playurl['name'].strip() + '$' + play_url + urlencode(playurl['url']))
|
||||||
|
})
|
||||||
|
});
|
||||||
|
let playFrom = [];
|
||||||
|
let playList = [];
|
||||||
|
Object.keys(playMap)
|
||||||
|
.forEach(function(key) {
|
||||||
|
playFrom.append(key);
|
||||||
|
playList.append(playMap[key].join('#'))
|
||||||
|
});
|
||||||
|
let vod_play_from = playFrom.join('$$$');
|
||||||
|
let vod_play_url = playList.join('$$$');
|
||||||
|
VOD['vod_play_from'] = vod_play_from;
|
||||||
|
VOD['vod_play_url'] = vod_play_url
|
||||||
|
} catch (e) {
|
||||||
|
log('获取二级详情页发生错误:' + e.message)
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
搜索:`js:
|
||||||
|
var d = [];
|
||||||
|
let html = request(input, {
|
||||||
|
headers: getHeaders(input)
|
||||||
|
});
|
||||||
|
html = JSON.parse(html);
|
||||||
|
html.data.forEach(function(it) {
|
||||||
|
d.push({
|
||||||
|
title: it.video_name,
|
||||||
|
img: it.img,
|
||||||
|
desc: it.qingxidu + '/' + it.category,
|
||||||
|
url: it.id,
|
||||||
|
content: it.blurb
|
||||||
|
})
|
||||||
|
});
|
||||||
|
setResult(d);
|
||||||
|
`,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue