上传文件至 js
This commit is contained in:
parent
7d99f73cec
commit
788337cb22
175
js/优酷视频.js
Normal file
175
js/优酷视频.js
Normal file
File diff suppressed because one or more lines are too long
66
js/搜狗视频.js
Normal file
66
js/搜狗视频.js
Normal file
File diff suppressed because one or more lines are too long
39
js/爱奇艺.js
Normal file
39
js/爱奇艺.js
Normal file
File diff suppressed because one or more lines are too long
153
js/腾讯视频.js
Normal file
153
js/腾讯视频.js
Normal file
@ -0,0 +1,153 @@
|
||||
var rule = {
|
||||
title: '腾讯视频[官]',
|
||||
host: 'https://v.%71%71.com',
|
||||
// homeUrl: '/x/bu/pagesheet/list?_all=1&append=1&channel=choice&listpage=1&offset=0&pagesize=21&iarea=-1&sort=18',
|
||||
homeUrl: '/x/bu/pagesheet/list?_all=1&append=1&channel=cartoon&listpage=1&offset=0&pagesize=21&iarea=-1&sort=18',
|
||||
detailUrl: 'https://node.video.%71%71.com/x/api/float_vinfo2?cid=fyid',
|
||||
searchUrl: '/x/search/?q=**&stag=fypage',
|
||||
searchable: 2,
|
||||
filterable: 1,
|
||||
multi: 1,
|
||||
// url:'/channel/fyclass?listpage=fypage&channel=fyclass&sort=18&_all=1',
|
||||
url: '/x/bu/pagesheet/list?_all=1&append=1&channel=fyclass&listpage=1&offset=((fypage-1)*21)&pagesize=21&iarea=-1',
|
||||
// filter_url: 'sort={{fl.sort or 18}}&year={{fl.year}}&pay={{fl.pay}}',
|
||||
filter_url: 'sort={{fl.sort or 75}}&year={{fl.year}}&pay={{fl.pay}}',
|
||||
filter: 'H4sIAAAAAAAAA+2UzUrDQBCA32XOEZLUJrGvIj0saaDBNisxBkIJCG3Fi4oepIg3EQoieqiH+vM23Zq+hRuaZLZ4ce9z2/lmd2d2+NgR+H0e+gF0DkdwFGTQgRMeJ2BAxIaSwvrqVnxcyzhlg9PttqjED2c/45cSy8DyIDcavr57q/lBw8XTd/E6qbnT8M3zTFyc72RtC/Jumd+2c8wy7KZ4nxSL5Z9uxHS+Gc+r83sWVp1eVttl4Dluk1h93YubWZVwduplAYuxoFguVp+P/y5om/Z+/YxyqfAW8pbKbeS2yi3kO/ebyE2Fy1nXXBm7DDzknspd5K7KHeSOytvI2+XAugYkKWlD2mhrM+RpSB8OmaNvTsriMEgycofc0XbHZ3HCeUTukDv67vTDQY/MIXO0zelxn5M4JI6mOPkvgswSEpgPAAA=',
|
||||
headers: {
|
||||
'User-Agent': 'PC_UA'
|
||||
},
|
||||
timeout: 5000,
|
||||
// class_parse:'.site_channel a;a&&Text;a&&href;channel/(.*)',
|
||||
cate_exclude: '会员|游戏|全部',
|
||||
class_name: '精选&电视剧&电影&综艺&动漫&少儿&纪录片',
|
||||
class_url: 'choice&tv&movie&variety&cartoon&child&doco',
|
||||
limit: 20,
|
||||
// play_parse:true,
|
||||
// 手动调用解析请求json的url,此lazy不方便
|
||||
lazy: 'js:input="https://cache.json.icu/home/api?type=ys&uid=292796&key=fnoryABDEFJNPQV269&url="+input.split("?")[0];log(input);let html=JSON.parse(request(input));log(html);input=html.url||input',
|
||||
推荐: '.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
|
||||
一级: '.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
|
||||
二级: $js.toString(() => {
|
||||
VOD = {};
|
||||
let d = [];
|
||||
let video_list = [];
|
||||
let video_lists = [];
|
||||
let list = [];
|
||||
let QZOutputJson;
|
||||
let html = fetch(input, fetch_params);
|
||||
let sourceId = /get_playsource/.test(input) ? input.match(/id=(\d*?)&/)[1] : input.split("cid=")[1];
|
||||
let cid = sourceId;
|
||||
let detailUrl = "https://v.%71%71.com/detail/m/" + cid + ".html";
|
||||
log("详情页:" + detailUrl);
|
||||
pdfh = jsp.pdfh;
|
||||
pd = jsp.pd;
|
||||
try {
|
||||
let json = JSON.parse(html);
|
||||
VOD = {
|
||||
vod_url: input,
|
||||
vod_name: json.c.title,
|
||||
type_name: json.typ.join(","),
|
||||
vod_actor: json.nam.join(","),
|
||||
vod_year: json.c.year,
|
||||
vod_content: json.c.description,
|
||||
vod_remarks: json.rec,
|
||||
vod_pic: urljoin2(input, json.c.pic)
|
||||
}
|
||||
} catch (e) {
|
||||
log("解析片名海报等基础信息发生错误:" + e.message)
|
||||
}
|
||||
if (/get_playsource/.test(input)) {
|
||||
eval(html);
|
||||
let indexList = QZOutputJson.PlaylistItem.indexList;
|
||||
indexList.forEach(function (it) {
|
||||
let dataUrl = "https://s.video.qq.com/get_playsource?id=" + sourceId + "&plat=2&type=4&data_type=3&range=" + it + "&video_type=10&plname=qq&otype=json";
|
||||
eval(fetch(dataUrl, fetch_params));
|
||||
let vdata = QZOutputJson.PlaylistItem.videoPlayList;
|
||||
vdata.forEach(function (item) {
|
||||
d.push({
|
||||
title: item.title,
|
||||
pic_url: item.pic,
|
||||
desc: item.episode_number + "\t\t\t播放量:" + item.thirdLine,
|
||||
url: item.playUrl
|
||||
})
|
||||
});
|
||||
video_lists = video_lists.concat(vdata)
|
||||
})
|
||||
} else {
|
||||
let json = JSON.parse(html);
|
||||
video_lists = json.c.video_ids;
|
||||
let url = "https://v.qq.com/x/cover/" + sourceId + ".html";
|
||||
if (video_lists.length === 1) {
|
||||
let vid = video_lists[0];
|
||||
url = "https://v.qq.com/x/cover/" + cid + "/" + vid + ".html";
|
||||
d.push({
|
||||
title: "在线播放",
|
||||
url: url
|
||||
})
|
||||
} else if (video_lists.length > 1) {
|
||||
for (let i = 0; i < video_lists.length; i += 30) {
|
||||
video_list.push(video_lists.slice(i, i + 30))
|
||||
}
|
||||
video_list.forEach(function (it, idex) {
|
||||
let o_url = "https://union.video.qq.com/fcgi-bin/data?otype=json&tid=1804&appid=20001238&appkey=6c03bbe9658448a4&union_platform=1&idlist=" + it.join(",");
|
||||
let o_html = fetch(o_url, fetch_params);
|
||||
eval(o_html);
|
||||
QZOutputJson.results.forEach(function (it1) {
|
||||
it1 = it1.fields;
|
||||
let url = "https://v.qq.com/x/cover/" + cid + "/" + it1.vid + ".html";
|
||||
d.push({
|
||||
title: it1.title,
|
||||
pic_url: it1.pic160x90.replace("/160", ""),
|
||||
desc: it1.video_checkup_time,
|
||||
url: url,
|
||||
type: it1.category_map && it1.category_map.length > 1 ? it1.category_map[1] : ""
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
let yg = d.filter(function (it) {
|
||||
return it.type && it.type !== "正片"
|
||||
});
|
||||
let zp = d.filter(function (it) {
|
||||
return !(it.type && it.type !== "正片")
|
||||
});
|
||||
VOD.vod_play_from = yg.length < 1 ? "qq" : "qq$$$qq 预告及花絮";
|
||||
VOD.vod_play_url = yg.length < 1 ? d.map(function (it) {
|
||||
return it.title + "$" + it.url
|
||||
}).join("#") : [zp, yg].map(function (it) {
|
||||
return it.map(function (its) {
|
||||
return its.title + "$" + its.url
|
||||
}).join("#")
|
||||
}).join("$$$");
|
||||
}),
|
||||
搜索: $js.toString(() => {
|
||||
let d = [];
|
||||
pdfa = jsp.pdfa;
|
||||
pdfh = jsp.pdfh;
|
||||
pd = jsp.pd;
|
||||
let html = request(input);
|
||||
let baseList = pdfa(html, "body&&.result_item_v");
|
||||
baseList.forEach(function (it) {
|
||||
let longText = pdfh(it, ".result_title&&a&&Text");
|
||||
let shortText = pdfh(it, ".type&&Text");
|
||||
let fromTag = pdfh(it, ".result_source&&Text");
|
||||
let score = pdfh(it, ".figure_info&&Text");
|
||||
let content = pdfh(it, ".desc_text&&Text");
|
||||
let url = pdfh(it, ".result_title&&a&&href");
|
||||
let img = pd(it, ".figure_pic&&src");
|
||||
url = "https://node.video.qq.com/x/api/float_vinfo2?cid=" + url.match(/.*\/(.*?)\.html/)[1];
|
||||
log(shortText + "|" + url);
|
||||
if (fromTag.match(/腾讯/)) {
|
||||
d.push({
|
||||
title: longText.split(shortText)[0],
|
||||
img: img,
|
||||
url: url,
|
||||
content: content,
|
||||
desc: shortText + " " + score
|
||||
})
|
||||
}
|
||||
});
|
||||
setResult(d);
|
||||
}),
|
||||
}
|
168
js/芒果视频.js
Normal file
168
js/芒果视频.js
Normal file
@ -0,0 +1,168 @@
|
||||
var rule = {
|
||||
title: '芒果视频[官]',
|
||||
host: 'https://pianku.api.%6d%67%74%76.com',
|
||||
homeUrl: '',
|
||||
searchUrl: 'https://mobileso.bz.%6d%67%74%76.com/pc/search/v1?q=**&pn=fypage&pc=10',
|
||||
detailUrl: 'https://pcweb.api.mgtv.com/episode/list?page=1&size=50&video_id=fyid',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 1,
|
||||
multi: 1,
|
||||
// 分类链接fypage参数支持1个()表达式
|
||||
// https://www.mgtv.com/lib/3?lastp=list_index&kind=a1&year=all&chargeInfo=a1&sort=c2
|
||||
url: '/rider/list/pcweb/v3?platform=pcweb&channelId=fyclass&pn=fypage&pc=80&hudong=1&_support=10000000&kind=a1&area=a1',
|
||||
filter_url: 'year={{fl.year or "all"}}&sort={{fl.sort or "all"}}&chargeInfo={{fl.chargeInfo or "all"}}',
|
||||
headers: {
|
||||
'User-Agent': 'PC_UA'
|
||||
},
|
||||
timeout: 5000,
|
||||
class_name: '电视剧&电影&综艺&动漫&纪录片&教育&少儿',
|
||||
class_url: '2&3&1&50&51&115&10',
|
||||
filter: 'H4sIAAAAAAAAA+2XvUrDUBSA3+XOHc65adraN+jm5CIdYok/GFupWiilIBalIFYoIh1EBxEKIih0MOZ1msS+hbc1yTni4mKms6XfIbnnC/mG9hSq6mZP7btdVVWNXae949aa2y1VUE3nwDVsHkw+Z378FoT3l4Z2HO/EXd3SNMPwfLoYTJfY/HA8T/UL6eDK3JUMtjDjnb3DFOoMbtTW45tpOHxPR1Y2Sk4/86PxSzotqn59Of/e+ajVPqZto9E4/Lj+tWd0dxrdviYPaNA6hseD9MEN2ih+eJr7o8XzJBxepNOfx3Zdp03Hhv5sHjz+/fVo0MUEry4Zt4hbnGvimnMkjpwDcWAc1zJuLhmvEK9wXiZe5rxEvMS5TdzmnHyR+yL5IvdF8kXui+SL3BfJF7kvkC9wXyBf4L5AvsB9gXyB+wL5AvcF8oXVl1MvKC2pSWqSWh6pWZKapCap5ZGaDdKatCat5dKa/FuT1qS1XFpD80YkNolNYvv32PpfCLkneIcUAAA=',
|
||||
limit: 20,
|
||||
play_parse: true,
|
||||
// 手动调用解析请求json的url,此lazy不方便
|
||||
// lazy:'js:print(input);fetch_params.headers["user-agent"]=MOBILE_UA;let html=request(input);let rurl=html.match(/window\\.open\\(\'(.*?)\',/)[1];rurl=urlDeal(rurl);input={parse:1,url:rurl};',
|
||||
// 推荐:'.list_item;img&&alt;img&&src;a&&Text;a&&data-float',
|
||||
一级: 'json:data.hitDocs;title;img;updateInfo||rightCorner.text;playPartId',
|
||||
// 一级:'json:data.hitDocs;title;img;updateInfo;playPartId',
|
||||
二级: $js.toString(() => {
|
||||
fetch_params.headers.Referer = "https://www.mgtv.com";
|
||||
fetch_params.headers["User-Agent"] = UA;
|
||||
pdfh = jsp.pdfh;
|
||||
pdfa = jsp.pdfa;
|
||||
pd = jsp.pd;
|
||||
VOD = {};
|
||||
let d = [];
|
||||
let html = request(input);
|
||||
let json = JSON.parse(html);
|
||||
let host = "https://www.mgtv.com";
|
||||
let ourl = json.data.list.length > 0 ? json.data.list[0].url : json.data.series[0].url;
|
||||
if (!/^http/.test(ourl)) {
|
||||
ourl = host + ourl
|
||||
}
|
||||
fetch_params.headers["User-Agent"] = MOBILE_UA;
|
||||
html = request(ourl);
|
||||
if (html.includes("window.location =")) {
|
||||
print("开始获取ourl");
|
||||
ourl = pdfh(html, "meta[http-equiv=refresh]&&content").split("url=")[1];
|
||||
print("获取到ourl:" + ourl);
|
||||
html = request(ourl)
|
||||
}
|
||||
try {
|
||||
let details = pdfh(html, ".m-details&&Html").replace(/h1>/, "h6>").replace(/div/g, "br");
|
||||
print(details);
|
||||
let actor = "",
|
||||
director = "",
|
||||
time = "";
|
||||
if (/播出时间/.test(details)) {
|
||||
actor = pdfh(html, "p:eq(5)&&Text").substr(0, 25);
|
||||
director = pdfh(html, "p:eq(4)&&Text");
|
||||
time = pdfh(html, "p:eq(3)&&Text")
|
||||
} else {
|
||||
actor = pdfh(html, "p:eq(4)&&Text").substr(0, 25);
|
||||
director = pdfh(html, "p:eq(3)&&Text");
|
||||
time = "已完结"
|
||||
}
|
||||
let _img = pd(html, ".video-img&&img&&src");
|
||||
let JJ = pdfh(html, ".desc&&Text").split("简介:")[1];
|
||||
let _desc = time;
|
||||
VOD.vod_name = pdfh(html, ".vt-txt&&Text");
|
||||
VOD.type_name = pdfh(html, "p:eq(0)&&Text").substr(0, 6);
|
||||
VOD.vod_area = pdfh(html, "p:eq(1)&&Text");
|
||||
VOD.vod_actor = actor;
|
||||
VOD.vod_director = director;
|
||||
VOD.vod_remarks = _desc;
|
||||
VOD.vod_pic = _img;
|
||||
VOD.vod_content = JJ;
|
||||
if (!VOD.vod_name) {
|
||||
VOD.vod_name = VOD.type_name;
|
||||
}
|
||||
} catch (e) {
|
||||
log("获取影片信息发生错误:" + e.message)
|
||||
}
|
||||
|
||||
function getRjpg(imgUrl, xs) {
|
||||
xs = xs || 3;
|
||||
let picSize = /jpg_/.test(imgUrl) ? imgUrl.split("jpg_")[1].split(".")[0] : false;
|
||||
let rjpg = false;
|
||||
if (picSize) {
|
||||
let a = parseInt(picSize.split("x")[0]) * xs;
|
||||
let b = parseInt(picSize.split("x")[1]) * xs;
|
||||
rjpg = a + "x" + b + ".jpg"
|
||||
}
|
||||
let img = /jpg_/.test(imgUrl) && rjpg ? imgUrl.replace(imgUrl.split("jpg_")[1], rjpg) : imgUrl;
|
||||
return img
|
||||
}
|
||||
|
||||
if (json.data.total === 1 && json.data.list.length === 1) {
|
||||
let data = json.data.list[0];
|
||||
let url = "https://www.mgtv.com" + data.url;
|
||||
d.push({
|
||||
title: data.t4,
|
||||
desc: data.t2,
|
||||
pic_url: getRjpg(data.img),
|
||||
url: url
|
||||
})
|
||||
} else if (json.data.list.length > 1) {
|
||||
for (let i = 1; i <= json.data.total_page; i++) {
|
||||
if (i > 1) {
|
||||
json = JSON.parse(fetch(input.replace("page=1", "page=" + i), {}))
|
||||
}
|
||||
json.data.list.forEach(function (data) {
|
||||
let url = "https://www.mgtv.com" + data.url;
|
||||
if (data.isIntact == "1") {
|
||||
d.push({
|
||||
title: data.t4,
|
||||
desc: data.t2,
|
||||
pic_url: getRjpg(data.img),
|
||||
url: url
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
print(input + "暂无片源")
|
||||
}
|
||||
VOD.vod_play_from = "mgtv";
|
||||
VOD.vod_play_url = d.map(function (it) {
|
||||
return it.title + "$" + it.url
|
||||
}).join("#");
|
||||
setResult(d);
|
||||
}),
|
||||
|
||||
搜索: $js.toString(() => {
|
||||
fetch_params.headers.Referer = "https://www.mgtv.com";
|
||||
fetch_params.headers["User-Agent"] = UA;
|
||||
let d = [];
|
||||
let html = request(input);
|
||||
let json = JSON.parse(html);
|
||||
json.data.contents.forEach(function (data) {
|
||||
if (data.data.sourceList || data.data.yearList) {
|
||||
let list = data.data.sourceList ? data.data.sourceList : data.data.yearList[0].sourceList;
|
||||
let desc = "";
|
||||
list.forEach(function (it) {
|
||||
desc += it.name + "\t"
|
||||
});
|
||||
let fyclass = '';
|
||||
if (list[0].source === "imgo") {
|
||||
let img = data.data.pic ? data.data.pic : data.data.yearList[0].pic;
|
||||
try {
|
||||
fyclass = data.data.desc.find(it => it.label === '类型').url.match(/lib\/(\d+)/)[1] + '$';
|
||||
} catch (e) {
|
||||
fyclass = '';
|
||||
}
|
||||
log(fyclass);
|
||||
d.push({
|
||||
title: data.data.title ? data.data.title : data.data.yearList[0].title,
|
||||
img: img,
|
||||
content: data.data.story ? data.data.story : data.data.yearList[0].story,
|
||||
desc: data.data.playTime,
|
||||
url: fyclass + list[0].vid
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
setResult(d);
|
||||
}),
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user