Add files via upload

This commit is contained in:
n3rddd 2024-05-27 21:18:21 +08:00 committed by GitHub
parent a639752a5b
commit 6d33244208
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 171 additions and 0 deletions

View File

@ -0,0 +1,12 @@
// http://localhost:5707/parse/api/CK.js?url=https://m.iqiyi.com/v_yxq6x4rsng.html
// https://www.ckplayer.vip/jiexi/?url=https://m.iqiyi.com/v_yxq6x4rsng.html
function lazy() {
try {
realUrl = snifferMediaUrl('https://www.ckplayer.vip/jiexi/?url=' + input).url;
return realUrl
} catch (e) {
log(e.message)
return input
}
}

View File

@ -0,0 +1,94 @@
// print(env);
// http://localhost:5707/parse/api/哔哩.js?url=https://www.bilibili.com/bangumi/play/ep704873
// input = 'https://www.bilibili.com/bangumi/play/ep704873';
var flag = ['bilibili'];
function getEpUrl(ssUrl) {
let html = request(ssUrl);
let short_link = html.match(/short_link(.*?),/)[1];
short_link = short_link.split(':').slice(1, -1).join('"').split('"')[1];
let epUrl = unescape(short_link);
return epUrl
}
function getCidEid(input) {
let url = input.split('?')[0];
// print(url);
if (url.endsWith('/')) {
url = url.slice(0, -1);
}
if (url.includes('bilibili.com/video/')) {
let r = request(input);
try {
let mtext = r.match(/window\.__INITIAL_STATE__=(.*?);\(function/)[1];
mtext = JSON.parse(mtext);
let avid = mtext['aid'];
let bvid = mtext['bvid'];
let cid = mtext['videoData']['cid'];
return [cid, avid, bvid]
} catch (e) {
return null
}
} else if (url.includes('/ep')) {
let epid = url.split('ep')[1];
let data_url = 'https://api.bilibili.com/pgc/view/web/season?ep_id=' + epid;
let r = JSON.parse(request(data_url));
if (r.code === 0) {
let episodes = r['result']['episodes'];
let furl = url.replace('https://m.bilibili.com', 'https://www.bilibili.com');
let now_ep = episodes.filter(function (it) {
return [it['short_link'], it['share_url'], it['link']].includes(furl)
})[0];
let avid = now_ep['aid'];
let cid = now_ep['cid'];
return [cid, avid, null];
} else {
return null
}
} else if (url.includes('/ss')) {
let epUrl = getEpUrl(input);
return getCid(epUrl)
} else {
return null
}
}
function lazy() {
fetch_params.headers = {
'User-Agent': PC_UA,
"Referer": "https://www.bilibili.com",
"Cookie": env.bili_cookie || ''
};
let appkey = env.appkey || '';
let access_key = env.access_key || '';
if (!/bilibili/.test(input)) {
realUrl = input;
} else {
try {
// print(input);
let ids = getCidEid(input);
if (Array.isArray(ids)) {
let cid = ids[0];
let avid = ids[1];
let rurl = "https://api.bilibili.com/x/player/playurl?avid=" + avid + "&cid=" + cid + "&qn=120&type=&128=128&otype=json&fnver=&fourk=1&mid=&appkey=" + appkey + "&access_key=" + access_key;
try {
let r = JSON.parse(request(rurl));
let purl = r['data']['durl'][0]['url'];
// realUrl = purl;
// https://upos-szbyjkm8g1.bilivideo.com
realUrl = purl.replace(/.*bilivideo.*?\/(.*)/, 'https://upos-szbyjkm8g1.bilivideo.com/$1');
} catch (e) {
realUrl = input;
}
} else {
realUrl = input;
}
} catch (e) {
print(e.message);
}
}
return realUrl
}

View File

@ -0,0 +1,12 @@
// http://localhost:5707/parse/api/夜幕.js?url=https://m.iqiyi.com/v_yxq6x4rsng.html
// https://www.yemu.xyz/?url=https://m.iqiyi.com/v_yxq6x4rsng.html
function lazy() {
try {
realUrl = snifferMediaUrl('https://www.yemu.xyz/?url=' + input).url;
return realUrl
} catch (e) {
log(e.message)
return input
}
}

View File

@ -0,0 +1,11 @@
// http://localhost:5707/parse/api/杰森.js?url=https://m.iqiyi.com/v_1pj3ayb1n70.html
function lazy() {
try {
realUrl = snifferMediaUrl('https://jx.jsonplayer.com/player/?url=' + input).url;
return realUrl
} catch (e) {
log(e.message)
return input
}
}

View File

@ -0,0 +1,12 @@
// http://localhost:5707/parse/api/盘古.js?url=https://m.iqiyi.com/v_yxq6x4rsng.html
// https://www.pangujiexi.com/jiexi/?url=https://m.iqiyi.com/v_yxq6x4rsng.html
function lazy() {
try {
realUrl = snifferMediaUrl('https://www.pangujiexi.com/jiexi/?url=' + input).url;
return realUrl
} catch (e) {
log(e.message)
return input
}
}

View File

@ -0,0 +1,12 @@
// http://localhost:5707/parse/api/虾米.js?url=https://m.iqiyi.com/v_yxq6x4rsng.html
// https://jx.xmflv.cc/?url=https://m.iqiyi.com/v_yxq6x4rsng.html
function lazy() {
try {
realUrl = snifferMediaUrl('https://jx.xmflv.cc/?url=' + input).url;
return realUrl
} catch (e) {
log(e.message)
return input
}
}

View File

@ -0,0 +1,18 @@
// http://localhost:5707/parse/api/阳途.js?url=https://m.iqiyi.com/v_1pj3ayb1n70.html
function lazy() {
try {
let custom_regex = 'http((?!http).){12,}?(download4|pcDownloadFile)';
let web_url = 'https://jx.yangtu.top/?url=' + input;
// globalThis._debug = True;
// console.log(custom_regex)
// console.log(web_url)
let result = snifferMediaUrl(web_url, 0, custom_regex)
// console.log(JSON.stringify(result));
realUrl = result.url;
return realUrl
} catch (e) {
log(e.message)
return input
}
}