Update Up

This commit is contained in:
cluntop 2025-12-26 21:55:35 +08:00
parent 1601477a55
commit 5ea1ed6050

View File

@ -22,14 +22,12 @@ const aggConfig = {
软鸭: { host: 'https://api.xingzhige.com', url1: '/API/playlet', search: '/API/playlet' }, 软鸭: { host: 'https://api.xingzhige.com', url1: '/API/playlet', search: '/API/playlet' },
七猫: { host: 'https://api-store.qmplaylet.com', url1: '/api/v1/playlet/index', url2: 'https://api-read.qmplaylet.com/player/api/v1/playlet/info', search: '/api/v1/playlet/search' }, 七猫: { host: 'https://api-store.qmplaylet.com', url1: '/api/v1/playlet/index', url2: 'https://api-read.qmplaylet.com/player/api/v1/playlet/info', search: '/api/v1/playlet/search' },
围观: { host: 'https://api.drama.9ddm.com', url1: '/drama/home/shortVideoTags', url2: '/drama/home/shortVideoDetail', search: '/drama/home/search' }, 围观: { host: 'https://api.drama.9ddm.com', url1: '/drama/home/shortVideoTags', url2: '/drama/home/shortVideoDetail', search: '/drama/home/search' },
碎片: { host: 'https://free-api.bighotwind.cc', url1: '/papaya/papaya-api/theater/tags', url2: '/papaya/papaya-api/videos/info', search: '/papaya/papaya-api/videos/page' },
甜圈: { host: 'https://mov.cenguigui.cn', url1: '/duanju/api.php?classname', url2: '/duanju/api.php?book_id', search: '/duanju/api.php?name' } 甜圈: { host: 'https://mov.cenguigui.cn', url1: '/duanju/api.php?classname', url2: '/duanju/api.php?book_id', search: '/duanju/api.php?name' }
}, },
platformList: [ platformList: [
{ name: '甜圈短剧', id: '甜圈' }, { name: '七猫短剧', id: '七猫' }, { name: '锦鲤短剧', id: '锦鲤' }, { name: '甜圈短剧', id: '甜圈' }, { name: '七猫短剧', id: '七猫' }, { name: '锦鲤短剧', id: '锦鲤' },
{ name: '番茄短剧', id: '番茄' }, { name: '星芽短剧', id: '星芽' }, { name: '西饭短剧', id: '西饭' }, { name: '番茄短剧', id: '番茄' }, { name: '星芽短剧', id: '星芽' }, { name: '西饭短剧', id: '西饭' },
{ name: '软鸭短剧', id: '软鸭' }, { name: '百度短剧', id: '百度' }, { name: '围观短剧', id: '围观' }, { name: '软鸭短剧', id: '软鸭' }, { name: '百度短剧', id: '百度' }, { name: '围观短剧', id: '围观' }
{ name: '碎片剧场', id: '碎片' }
], ],
search: { limit: 30, timeout: 6000 } search: { limit: 30, timeout: 6000 }
}; };
@ -43,7 +41,6 @@ const ruleFilterDef = {
软鸭: { area: '战神' }, 软鸭: { area: '战神' },
七猫: { area: '0' }, 七猫: { area: '0' },
围观: { area: '' }, 围观: { area: '' },
碎片: { area: '' },
甜圈: { area: '推荐榜' } 甜圈: { area: '推荐榜' }
}; };
@ -238,25 +235,6 @@ async function category(tid, pg, filter, extend) {
if (res?.data) videos.push(...res.data.map(i => ({ if (res?.data) videos.push(...res.data.map(i => ({
vod_id: `围观@${i.oneId}`, vod_name: i.title, vod_pic: i.vertPoster, vod_remarks: `集数:${i.episodeCount} 播放:${i.viewCount}` vod_id: `围观@${i.oneId}`, vod_name: i.title, vod_pic: i.vertPoster, vod_remarks: `集数:${i.episodeCount} 播放:${i.viewCount}`
}))); })));
} else if (tid === '碎片') {
let openId = (await md5(guid())).substring(0, 16);
let body = JSON.stringify({ openId });
let key = CryptoJS.enc.Utf8.parse("p0sfjw@k&qmewu#w");
const encrypted = CryptoJS.AES.encrypt(body, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }).ciphertext.toString(CryptoJS.enc.Hex);
const tokenRes = JSON.parse(await request("https://free-api.bighotwind.cc/papaya/papaya-api/oauth2/uuid", {
method: 'POST', headers: { 'Content-Type': 'application/json', 'key': encrypted }, body
}));
if (tokenRes?.data?.token) {
const headers = { ...aggConfig.headers.default, 'Authorization': tokenRes.data.token };
const url = `${plat.host}${plat.search}?type=5&tagId=&pageNum=${page}&pageSize=24`;
const res = JSON.parse(await request(url, { headers }));
if (res?.list) videos.push(...res.list.map(i => ({
vod_id: `碎片@${i.itemId}@${i.videoCode}`,
vod_name: i.title,
vod_pic: `https://speed.hiknz.com/papaya/papaya-file/files/download/${i.imageKey}/${i.imageName}`,
vod_remarks: `集数:${i.episodesMax} 播放:${i.hitShowNum}`
})));
}
} else if (tid === '甜圈') { } else if (tid === '甜圈') {
const url = `${plat.host}${plat.url1}=${encodeURIComponent(area)}&offset=${page}`; const url = `${plat.host}${plat.url1}=${encodeURIComponent(area)}&offset=${page}`;
const res = JSON.parse(await request(url)); const res = JSON.parse(await request(url));
@ -340,8 +318,8 @@ async function detail(id) {
} else if (platId === '软鸭') { } else if (platId === '软鸭') {
const didDecoded = decodeURIComponent(did); const didDecoded = decodeURIComponent(did);
const [title, img, author, type, desc, book_id] = didDecoded.split('@'); const [title, img, author, type, desc, book_id] = didDecoded.split('@');
const detailUrl = `${plat.host}${plat.url1}/?book_id=${book_id}`; const detailUrl = `${plat.host}${plat.url1}/?book_id=${book_id || did.split('@')[5]}`;
const res = JSON.parse(await request(detailUrl)); const res = JSON.parse(await request(detailUrl, { headers: aggConfig.headers.default }));
const u = (res.data?.video_list || []).map(e => `${e.title}$${e.video_id}`).join('#'); const u = (res.data?.video_list || []).map(e => `${e.title}$${e.video_id}`).join('#');
vod = { ...vod, vod_name: title, vod_pic: img, vod_remarks: type, vod_content: desc, vod_play_from: '软鸭短剧', vod_play_url: u }; vod = { ...vod, vod_name: title, vod_pic: img, vod_remarks: type, vod_content: desc, vod_play_from: '软鸭短剧', vod_play_url: u };
} else if (platId === '围观') { } else if (platId === '围观') {
@ -350,29 +328,8 @@ async function detail(id) {
const d = res.data; const d = res.data;
vod = { ...vod, vod_name: d[0].title, vod_pic: d[0].vertPoster, vod_remarks: `${d.length}`, vod_play_from: '围观短剧', vod_play_url: d.map(e => `${e.title}${e.playOrder}$${e.playSetting}`).join('#') }; vod = { ...vod, vod_name: d[0].title, vod_pic: d[0].vertPoster, vod_remarks: `${d.length}`, vod_play_from: '围观短剧', vod_play_url: d.map(e => `${e.title}${e.playOrder}$${e.playSetting}`).join('#') };
} }
} else if (platId === '碎片') {
const [itemId, videoCode] = did.split('@');
let openId = (await md5(guid())).substring(0, 16);
let body = JSON.stringify({ openId });
let key = CryptoJS.enc.Utf8.parse("p0sfjw@k&qmewu#w");
const encrypted = CryptoJS.AES.encrypt(body, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }).ciphertext.toString(CryptoJS.enc.Hex);
const tokenRes = JSON.parse(await request("https://free-api.bighotwind.cc/papaya/papaya-api/oauth2/uuid", {
method: 'POST', headers: { 'Content-Type': 'application/json', 'key': encrypted }, body
}));
if (tokenRes?.data?.token) {
const headers = { ...aggConfig.headers.default, 'Authorization': tokenRes.data.token };
const res = JSON.parse(await request(`${plat.host}${plat.url2}?videoCode=${videoCode}&itemId=${itemId}`, { headers }));
if (res) {
const d = res.data || res;
const pic = `https://speed.hiknz.com/papaya/papaya-file/files/download/${d.imageKey}/${d.imageName}`;
const u = (d.episodesList || []).map(e => {
const best = e.resolutionList?.sort((a, b) => b.resolution - a.resolution)[0];
return best ? `${e.episodes}$https://speed.hiknz.com/papaya/papaya-file/files/download/${best.fileKey}/${best.fileName}` : null;
}).filter(Boolean).join('#');
vod = { ...vod, vod_name: d.title, vod_pic: pic, vod_remarks: `${d.episodesMax || 0}`, vod_play_from: '碎片剧场', vod_play_url: u };
}
}
} }
} catch (e) { vod.vod_name = '加载失败'; } } catch (e) { vod.vod_name = '加载失败'; }
return JSON.stringify({ list: [vod] }); return JSON.stringify({ list: [vod] });
} }
@ -416,6 +373,11 @@ async function play(flag, id) {
} }
} catch {} } catch {}
} }
if (/软鸭/.test(flag)) {
const response = await request(`${aggConfig.platform.软鸭.host}/API/playlet/?video_id=${id}&quality=1080p`, { headers: aggConfig.headers.default });
const res = JSON.parse(response);
return JSON.stringify({ parse: 0, url: res.data?.video?.url || '' });
}
if (/围观/.test(flag)) { if (/围观/.test(flag)) {
try { try {
const ps = typeof id === 'string' ? JSON.parse(id) : id; const ps = typeof id === 'string' ? JSON.parse(id) : id;
@ -449,7 +411,7 @@ async function search(wd, quick, pg) {
} }
}); });
} catch {} } catch {}
const platforms = ['百度', '锦鲤', '番茄', '星芽', '西饭', '软鸭', '围观', '碎片', '甜圈']; const platforms = ['百度', '锦鲤', '番茄', '星芽', '西饭', '软鸭', '围观', '甜圈'];
for (const tid of platforms) { for (const tid of platforms) {
const plat = aggConfig.platform[tid]; const plat = aggConfig.platform[tid];
try { try {
@ -487,25 +449,6 @@ async function search(wd, quick, pg) {
body: JSON.stringify({ audience: "", page, pageSize: 30, searchWord: wd, subject: "" }) body: JSON.stringify({ audience: "", page, pageSize: 30, searchWord: wd, subject: "" })
}); });
data = (JSON.parse(res)?.data || []).map(i => ({ vod_id: `围观@${i.oneId}`, vod_name: i.title, vod_pic: i.vertPoster, vod_remarks: `围观短剧|集数:${i.episodeCount} 播放:${i.viewCount}` })); data = (JSON.parse(res)?.data || []).map(i => ({ vod_id: `围观@${i.oneId}`, vod_name: i.title, vod_pic: i.vertPoster, vod_remarks: `围观短剧|集数:${i.episodeCount} 播放:${i.viewCount}` }));
} else if (tid === '碎片') {
let openId = (await md5(guid())).substring(0, 16);
let body = JSON.stringify({ openId });
let key = CryptoJS.enc.Utf8.parse("p0sfjw@k&qmewu#w");
const encrypted = CryptoJS.AES.encrypt(body, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 }).ciphertext.toString(CryptoJS.enc.Hex);
const tokenRes = JSON.parse(await request("https://free-api.bighotwind.cc/papaya/papaya-api/oauth2/uuid", {
method: 'POST', headers: { 'Content-Type': 'application/json', 'key': encrypted }, body, timeout: aggConfig.search.timeout
}));
if (tokenRes?.data?.token) {
const headers = { ...aggConfig.headers.default, 'Authorization': tokenRes.data.token };
const url = `${plat.host}${aggConfig.platform.碎片.search}?type=5&tagId=&pageNum=${page}&pageSize=30&title=${encodeURIComponent(wd)}`;
res = await request(url, { headers });
data = (JSON.parse(res)?.list || []).map(i => ({
vod_id: `碎片@${i.itemId}@${i.videoCode}`,
vod_name: i.title,
vod_pic: `https://speed.hiknz.com/papaya/papaya-file/files/download/${i.imageKey}/${i.imageName}`,
vod_remarks: `碎片剧场|集数:${i.episodesMax} 播放:${i.hitShowNum}`
}));
}
} else if (tid === '甜圈') { } else if (tid === '甜圈') {
const url = `${plat.host}${plat.search}=${encodeURIComponent(wd)}&offset=${page}`; const url = `${plat.host}${plat.search}=${encodeURIComponent(wd)}&offset=${page}`;
res = await request(url); res = await request(url);