Sync all projects
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"规则名": "农民影视",
|
||||
"规则作者": "香雅情",
|
||||
"请求头参数": "User-Agent$手机#accept$text/html#Referer$https://vip.wwgz.cn:5200/",
|
||||
"网页编码格式": "UTF-8",
|
||||
"图片是否需要代理": "0",
|
||||
"是否开启获取首页数据": "1",
|
||||
"首页推荐链接": "https://vip.wwgz.cn:5200/",
|
||||
"首页列表数组规则": "body&&.globalPicList",
|
||||
"首页片单列表数组规则": "li:has(img)",
|
||||
"首页片单是否Jsoup写法": "1",
|
||||
"首页片单标题": ".sTit&&Text",
|
||||
"首页片单链接": "a&&href",
|
||||
"首页片单图片": "img&&data-echo||data-src||src",
|
||||
"首页片单副标题": ".sBottom&&Text",
|
||||
"首页片单链接加前缀": "https://vip.wwgz.cn:5200/",
|
||||
"首页片单链接加后缀": "",
|
||||
"分类起始页码": "1",
|
||||
"分类链接": "https://vip.wwgz.cn:5200/vod-list-id-{cateId}-pg-{catePg}-order--by-{by}-class--year-{year}-letter--area-{area}-lang-.html",
|
||||
"分类名称": "电影&电视剧&综艺&动漫&短剧",
|
||||
"分类名称替换词": "1&2&3&4&26",
|
||||
"筛选数据": "ext",
|
||||
"筛选子分类名称": "动作片&喜剧片&爱情片&科幻片&恐怖片&剧情片&战争片&惊悚片&奇幻片||国产剧&港台泰&日韩剧&欧美剧||空||动漫剧&动漫片",
|
||||
"筛选子分类替换词": "5&6&7&8&9&10&11&16&17||12&13&14&15||空||18&19",
|
||||
"筛选地区名称": "大陆&香港&台湾&美国&韩国&日本&泰国&新加坡&马来西亚&印度&英国&法国&加拿大&西班牙&俄罗斯&其它",
|
||||
"筛选地区替换词": "*",
|
||||
"分类截取模式": "1",
|
||||
"分类列表数组规则": ".globalPicList&&li",
|
||||
"分类片单是否Jsoup写法": "1",
|
||||
"分类片单标题": ".sTit&&Text",
|
||||
"分类片单链接": "a&&href",
|
||||
"分类片单图片": "img&&data-echo||data-src||src",
|
||||
"分类片单副标题": ".sBottom&&Text",
|
||||
"分类片单链接加前缀": "https://vip.wwgz.cn:5200/",
|
||||
"分类片单链接加后缀": "",
|
||||
"搜索请求头参数": "User-Agent$手机#Referer$https://vip.wwgz.cn:5200/",
|
||||
"search_url": "https://vip.wwgz.cn:5200/index.php?m=vod-search;post",
|
||||
"sea_PtBody": "wd={wd}",
|
||||
"search_mode": "1",
|
||||
"sea_arr_rule": "#data_list&&li",
|
||||
"sea_is_jsoup": "1",
|
||||
"sea_pic": ".lazyload&&data-src",
|
||||
"sea_title": ".sTit&&Text",
|
||||
"sea_url": "a&&href",
|
||||
"搜索片单副标题": ".sDes,-1&&Text",
|
||||
"搜索片单链接加前缀": "https://vip.wwgz.cn:5200/",
|
||||
"搜索片单链接加后缀": "",
|
||||
"链接是否直接播放": "0",
|
||||
"直接播放链接加前缀": "https://live.52sf.ga/huya/",
|
||||
"直接播放链接加后缀": "#isVideo=true#",
|
||||
"直接播放直链视频请求头": "authority$ku.peizq.online#Referer$https://play.peizq.online",
|
||||
"详情是否Jsoup写法": "1",
|
||||
"类型详情": ".type-title&&Text",
|
||||
"年代详情": "body&&span:contains(年代:)&&Text!年代:",
|
||||
"地区详情": "",
|
||||
"演员详情": "body&&.sDes:contains(主演:)&&Text!主演:",
|
||||
"简介详情": ".detail-con&&p&&Text!简介:",
|
||||
"线路列表数组规则": "#leftTabBox&&ul&&li",
|
||||
"播放列表数组规则": "#leftTabBox&&.numList",
|
||||
"选集列表数组规则": "li",
|
||||
"选集标题链接是否Jsoup写法": "1",
|
||||
"选集标题": "a&&Text",
|
||||
"选集链接": "a&&href",
|
||||
"是否反转选集序列": "1",
|
||||
"选集链接加前缀": "https://vip.wwgz.cn:5200/",
|
||||
"选集链接加后缀": "",
|
||||
"分析MacPlayer": "0",
|
||||
"是否开启手动嗅探": "1",
|
||||
"手动嗅探视频链接关键词": ".mp4#.m3u8#item/video#video_mp4#video/tos",
|
||||
"手动嗅探视频链接过滤词": ".html#=http"
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* 锦鲤短剧 - 解决“非法访问”修复版
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://api.jinlidj.com';
|
||||
const UA = 'Mozilla/5.0 (Linux; Android 12; SM-G991B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Mobile Safari/537.36';
|
||||
|
||||
async function init(cfg) { return ""; }
|
||||
|
||||
async function home() {
|
||||
return JSON.stringify({
|
||||
class: [
|
||||
{ type_id: "1", type_name: "情感关系" },
|
||||
{ type_id: "2", type_name: "成长逆袭" },
|
||||
{ type_id: "3", type_name: "奇幻异能" },
|
||||
{ type_id: "4", type_name: "战斗热血" },
|
||||
{ type_id: "5", type_name: "伦理现实" },
|
||||
{ type_id: "6", type_name: "时空穿越" },
|
||||
{ type_id: "7", type_name: "权谋身份" }
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async function category(tid, pg, filter, extend) {
|
||||
const url = baseUrl + '/api/search';
|
||||
const response = await req(url, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json', 'User-Agent': UA },
|
||||
body: JSON.stringify({ page: pg, limit: 24, type_id: tid })
|
||||
});
|
||||
const resData = typeof response.content === 'string' ? JSON.parse(response.content) : response.content;
|
||||
return JSON.stringify({ page: parseInt(pg) || 1, list: resData.data.list || [] });
|
||||
}
|
||||
|
||||
async function detail(id) {
|
||||
const vodId = Array.isArray(id) ? id[0] : id;
|
||||
const url = baseUrl + '/api/detail/' + vodId;
|
||||
|
||||
// 增加 Referer 模拟,有些短剧接口根据 Referer 下发不同的 Token
|
||||
const response = await req(url, {
|
||||
headers: {
|
||||
'User-Agent': UA,
|
||||
'Referer': 'https://www.jinlidj.com/'
|
||||
}
|
||||
});
|
||||
|
||||
const resData = typeof response.content === 'string' ? JSON.parse(response.content) : response.content;
|
||||
const data = resData.data;
|
||||
|
||||
const player = data.player || {};
|
||||
const playUrlParts = [];
|
||||
|
||||
for (const key in player) {
|
||||
// 关键点:保持 &auto=1,这是原始脚本里有的,可能参与了 URL 校验
|
||||
playUrlParts.push(key.replace(/\$|#/g, ' ') + '$' + player[key] + '&auto=1');
|
||||
}
|
||||
|
||||
return JSON.stringify({
|
||||
list: [{
|
||||
"vod_id": data.vod_id,
|
||||
"vod_name": data.vod_name,
|
||||
"vod_pic": data.vod_pic,
|
||||
"vod_play_from": "锦鲤短剧",
|
||||
"vod_play_url": playUrlParts.join('#')
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
async function play(flag, id, flags) {
|
||||
// 如果浏览器提示非法访问,通常是因为缺少了 X-Requested-With
|
||||
// 这个字段会让服务器认为你是在 App 的 WebView 里打开的
|
||||
return JSON.stringify({
|
||||
parse: 1,
|
||||
url: id,
|
||||
header: {
|
||||
'User-Agent': UA,
|
||||
'X-Requested-With': 'com.jinlidj.app', // 必须伪装成 App 包名
|
||||
'Referer': 'https://www.jinlidj.com/',
|
||||
'Origin': 'https://player.jinlidj.com'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function search(wd, quick, pg) {
|
||||
const url = baseUrl + '/api/search';
|
||||
const response = await req(url, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json', 'User-Agent': UA },
|
||||
body: JSON.stringify({ page: pg, limit: 24, keyword: wd })
|
||||
});
|
||||
const resData = typeof response.content === 'string' ? JSON.parse(response.content) : response.content;
|
||||
return JSON.stringify({ page: parseInt(pg) || 1, list: resData.data.list || [] });
|
||||
}
|
||||
|
||||
export default { home, category, detail, search, play };
|
||||
@@ -0,0 +1,194 @@
|
||||
var rule = {
|
||||
title: '星之阁[短]',
|
||||
host: 'https://api.xingzhige.com',
|
||||
homeUrl: '/API/playlet/?keyword=推荐榜&page=1',
|
||||
url: '/API/playlet/?keyword=fyclass&page=fypage',
|
||||
searchUrl: '/API/playlet/?keyword=**&page=fypage',
|
||||
detailUrl:'/API/playlet/?book_id=fyid',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 1,
|
||||
headers: {
|
||||
'User-Agent': MOBILE_UA,
|
||||
'Origin': HOST,
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
'Referer': HOST + '/'
|
||||
},
|
||||
timeout: 5000,
|
||||
class_parse: $js.toString(() => {
|
||||
let classes = [
|
||||
{ type_id: '推荐榜', type_name: '推荐榜' },
|
||||
{ type_id: '新剧', type_name: '新剧' },
|
||||
{ type_id: '逆袭', type_name: '逆袭' },
|
||||
{ type_id: '霸总', type_name: '霸总' },
|
||||
{ type_id: '现代言情', type_name: '现代言情' },
|
||||
{ type_id: '打脸虐渣', type_name: '打脸虐渣' },
|
||||
{ type_id: '豪门恩怨', type_name: '豪门恩怨' },
|
||||
{ type_id: '神豪', type_name: '神豪' },
|
||||
{ type_id: '马甲', type_name: '马甲' },
|
||||
{ type_id: '都市日常', type_name: '都市日常' },
|
||||
{ type_id: '战神归来', type_name: '战神归来' },
|
||||
{ type_id: '小人物', type_name: '小人物' },
|
||||
{ type_id: '女性成长', type_name: '女性成长' },
|
||||
{ type_id: '大女主', type_name: '大女主' },
|
||||
{ type_id: '穿越', type_name: '穿越' },
|
||||
{ type_id: '都市修仙', type_name: '都市修仙' },
|
||||
{ type_id: '强者回归', type_name: '强者回归' },
|
||||
{ type_id: '亲情', type_name: '亲情' },
|
||||
{ type_id: '古装', type_name: '古装' },
|
||||
{ type_id: '重生', type_name: '重生' },
|
||||
{ type_id: '闪婚', type_name: '闪婚' },
|
||||
{ type_id: '赘婿逆袭', type_name: '赘婿逆袭' },
|
||||
{ type_id: '虐恋', type_name: '虐恋' },
|
||||
{ type_id: '追妻', type_name: '追妻' },
|
||||
{ type_id: '天下无敌', type_name: '天下无敌' },
|
||||
{ type_id: '家庭伦理', type_name: '家庭伦理' },
|
||||
{ type_id: '萌宝', type_name: '萌宝' },
|
||||
{ type_id: '古风权谋', type_name: '古风权谋' },
|
||||
{ type_id: '职场', type_name: '职场' },
|
||||
{ type_id: '奇幻脑洞', type_name: '奇幻脑洞' },
|
||||
{ type_id: '异能', type_name: '异能' },
|
||||
{ type_id: '无敌神医', type_name: '无敌神医' },
|
||||
{ type_id: '古风言情', type_name: '古风言情' },
|
||||
{ type_id: '传承觉醒', type_name: '传承觉醒' },
|
||||
{ type_id: '现言甜宠', type_name: '现言甜宠' },
|
||||
{ type_id: '奇幻爱情', type_name: '奇幻爱情' },
|
||||
{ type_id: '乡村', type_name: '乡村' },
|
||||
{ type_id: '历史古代', type_name: '历史古代' },
|
||||
{ type_id: '王妃', type_name: '王妃' },
|
||||
{ type_id: '高手下山', type_name: '高手下山' },
|
||||
{ type_id: '娱乐圈', type_name: '娱乐圈' },
|
||||
{ type_id: '强强联合', type_name: '强强联合' },
|
||||
{ type_id: '破镜重圆', type_name: '破镜重圆' },
|
||||
{ type_id: '暗恋成真', type_name: '暗恋成真' },
|
||||
{ type_id: '民国', type_name: '民国' },
|
||||
{ type_id: '欢喜冤家', type_name: '欢喜冤家' },
|
||||
{ type_id: '系统', type_name: '系统' },
|
||||
{ type_id: '真假千金', type_name: '真假千金' },
|
||||
{ type_id: '龙王', type_name: '龙王' },
|
||||
{ type_id: '校园', type_name: '校园' },
|
||||
{ type_id: '穿书', type_name: '穿书' },
|
||||
{ type_id: '女帝', type_name: '女帝' },
|
||||
{ type_id: '团宠', type_name: '团宠' },
|
||||
{ type_id: '年代爱情', type_name: '年代爱情' },
|
||||
{ type_id: '玄幻仙侠', type_name: '玄幻仙侠' },
|
||||
{ type_id: '青梅竹马', type_name: '青梅竹马' },
|
||||
{ type_id: '悬疑推理', type_name: '悬疑推理' },
|
||||
{ type_id: '皇后', type_name: '皇后' },
|
||||
{ type_id: '替身', type_name: '替身' },
|
||||
{ type_id: '大叔', type_name: '大叔' },
|
||||
{ type_id: '喜剧', type_name: '喜剧' },
|
||||
{ type_id: '剧情', type_name: '剧情' }
|
||||
];
|
||||
input = classes;
|
||||
}),
|
||||
play_parse: true,
|
||||
double: true,
|
||||
推荐: $js.toString(() => {
|
||||
let html = request(input);
|
||||
let data = JSON.parse(html);
|
||||
if (data && data.data) {
|
||||
VODS = data.data.map(item => ({
|
||||
vod_id: `${item.book_id}@${item.author}`,
|
||||
vod_name: item.title,
|
||||
vod_pic: item.cover,
|
||||
vod_remarks: item.type
|
||||
}));
|
||||
} else {
|
||||
VODS = [];
|
||||
}
|
||||
}),
|
||||
一级: $js.toString(() => {
|
||||
let html = request(input);
|
||||
let data = JSON.parse(html);
|
||||
if (data && data.data) {
|
||||
VODS = data.data.map(item => ({
|
||||
vod_id: `${item.book_id}@${item.author}`,
|
||||
vod_name: item.title,
|
||||
vod_pic: item.cover,
|
||||
vod_remarks: item.type
|
||||
}));
|
||||
} else {
|
||||
VODS = [];
|
||||
}
|
||||
}),
|
||||
二级: $js.toString(() => {
|
||||
let [kid, kactor] = input.split('@');
|
||||
let html = request(kid);
|
||||
let kdetail = JSON.parse(html);
|
||||
let detail = kdetail.data.detail || {};
|
||||
let video_list = kdetail.data.video_list || [];
|
||||
let kurls = video_list.map((it) => {
|
||||
return `${it.title}$${it.video_id}`
|
||||
}).join('#');
|
||||
|
||||
VOD = {
|
||||
vod_id: kid,
|
||||
vod_name: detail.title || '',
|
||||
vod_pic: detail.cover || '',
|
||||
type_name: detail.category_schema || '',
|
||||
vod_remarks: `共${detail.total || 0}集 · ${detail.duration || ''}`,
|
||||
vod_director: detail.record_number || '',
|
||||
vod_actor: kactor,
|
||||
vod_content: detail.desc || '',
|
||||
vod_play_from: '星之阁专线',
|
||||
vod_play_url: kurls
|
||||
}
|
||||
}),
|
||||
搜索: $js.toString(() => {
|
||||
let html = request(input);
|
||||
let data = JSON.parse(html);
|
||||
if (data && data.data) {
|
||||
VODS = data.data.map(item => ({
|
||||
vod_id: `${item.book_id}@${item.author}`,
|
||||
vod_name: item.title,
|
||||
vod_pic: item.cover,
|
||||
vod_remarks: item.type
|
||||
}));
|
||||
} else {
|
||||
VODS = [];
|
||||
}
|
||||
}),
|
||||
lazy: $js.toString(() => {
|
||||
const video_id = input;
|
||||
// 清晰度映射,可根据实际调整
|
||||
const QUALITY_MAP = {
|
||||
'1080p': '蓝光',
|
||||
'720p': '超清',
|
||||
'480p': '高清',
|
||||
'360p': '标清'
|
||||
};
|
||||
|
||||
function fetchJson(url) {
|
||||
try {
|
||||
let headers = {
|
||||
'User-Agent': 'okhttp/3.12.11',
|
||||
'Content-Type': 'application/json; charset=utf-8'
|
||||
};
|
||||
let html = request(url, { headers: headers });
|
||||
return JSON.parse(html);
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
let urls = [];
|
||||
for (let level in QUALITY_MAP) {
|
||||
let display = QUALITY_MAP[level];
|
||||
let apiUrl = HOST + '/API/playlet/?video_id=' + video_id + '&quality=' + level;
|
||||
let data = fetchJson(apiUrl);
|
||||
if (data && data.data && data.data.video && data.data.video.url) {
|
||||
let videoUrl = data.data.video.url;
|
||||
urls.push(`星之阁-${display}`, videoUrl);
|
||||
}
|
||||
}
|
||||
|
||||
if (urls.length > 0) {
|
||||
// 返回多清晰度列表,播放器将显示这些选项
|
||||
input = { parse: 0, url: urls };
|
||||
} else {
|
||||
// 如果全部失败,留空或保留原逻辑(可选)
|
||||
input = '';
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,261 @@
|
||||
globalThis.verifyBox = function(url) {
|
||||
const sendRequest = (requestUrl, options = {}) => {
|
||||
const res = request(requestUrl, {
|
||||
headers: rule.headers,
|
||||
withHeaders: true,
|
||||
redirect: false,
|
||||
method: 'GET',
|
||||
...options
|
||||
});
|
||||
return typeof res === 'string' ? JSON.parse(res) : res;
|
||||
};
|
||||
|
||||
const firstRes = sendRequest(url);
|
||||
const html = firstRes.body || firstRes;
|
||||
|
||||
const encrypt = (str) => {
|
||||
const chars = "PXhw7UT1B0a9kQDKZsjIASmOezxYG4CHo5Jyfg2b8FLpEvRr3WtVnlqMidu6cN";
|
||||
const len = chars.length;
|
||||
const result = new Array(str.length * 3);
|
||||
|
||||
for (let i = 0, j = 0; i < str.length; i++, j += 3) {
|
||||
const char = str[i];
|
||||
const idx = chars.indexOf(char);
|
||||
|
||||
const r1 = Math.random() * len | 0;
|
||||
const r2 = Math.random() * len | 0;
|
||||
|
||||
result[j] = chars[r1];
|
||||
result[j + 1] = idx === -1 ? char : chars[(idx + 3) % len];
|
||||
result[j + 2] = chars[r2];
|
||||
}
|
||||
|
||||
return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(result.join('')));
|
||||
};
|
||||
|
||||
// 获取cookie的函数
|
||||
const getPhpSessionId = (response) => {
|
||||
const cookies = response['set-cookie'] || [];
|
||||
const cookieArr = Array.isArray(cookies) ? cookies : [cookies];
|
||||
const phpsessid = cookieArr.find(c => c?.includes('PHPSESSID'))?.split(';')[0]?.trim();
|
||||
return phpsessid || '';
|
||||
};
|
||||
|
||||
// 提取当前响应的cookie
|
||||
let currentCookie = getPhpSessionId(firstRes);
|
||||
|
||||
if (!/人机验证|防火墙正在检查/.test(html)) {
|
||||
// 如果没有验证,返回对象包含cookie和页面内容
|
||||
return {
|
||||
cookie: currentCookie,
|
||||
content: html
|
||||
};
|
||||
}
|
||||
|
||||
const tokenMatch = html.match(/var token = encrypt\("([^"]+)"\)/);
|
||||
const key = tokenMatch ? tokenMatch[1] : '';
|
||||
|
||||
const value = encrypt(url);
|
||||
const token = encrypt(key);
|
||||
const data = 'value=' + value + "&token=" + token;
|
||||
const yz_url = rule.host + '/robot.php';
|
||||
|
||||
const verifyRes = sendRequest(yz_url, {
|
||||
headers: {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
'origin': rule.host,
|
||||
'referer': rule.host,
|
||||
'cookie': currentCookie || ''
|
||||
},
|
||||
withHeaders: true,
|
||||
method: 'POST',
|
||||
body: data
|
||||
});
|
||||
|
||||
const verifyData = verifyRes.body || verifyRes;
|
||||
let verifyMsg = verifyData;
|
||||
if (typeof verifyData === 'string') {
|
||||
verifyMsg = JSON.parse(verifyData);
|
||||
}
|
||||
|
||||
if (verifyMsg.msg === 'ok') {
|
||||
const start = Date.now();
|
||||
while (Date.now() - start < 1000) {
|
||||
// 空循环,等待1秒
|
||||
}
|
||||
|
||||
const finalRes = request(url, {
|
||||
headers: {
|
||||
'cookie': currentCookie || ''
|
||||
},
|
||||
withHeaders: false,
|
||||
redirect: false,
|
||||
method: 'GET'
|
||||
});
|
||||
|
||||
const finalContent = typeof finalRes === 'string' ? finalRes : (finalRes.body || finalRes);
|
||||
|
||||
// 验证通过,返回包含cookie和页面内容的对象
|
||||
return {
|
||||
success: true,
|
||||
cookie: currentCookie,
|
||||
content: finalContent,
|
||||
message: '验证通过'
|
||||
};
|
||||
}
|
||||
|
||||
// 验证失败,返回对象包含cookie和原始页面
|
||||
return {
|
||||
success: false,
|
||||
cookie: currentCookie,
|
||||
content: html,
|
||||
message: '验证失败'
|
||||
};
|
||||
};
|
||||
|
||||
// 使用示例:
|
||||
// const result = verifyBox('https://example.com/page');
|
||||
// if (result.success) {
|
||||
// // 保存cookie供后续使用
|
||||
// const savedCookie = result.cookie;
|
||||
// // 使用cookie进行其他请求
|
||||
// const nextPage = request('https://example.com/next', {
|
||||
// headers: {
|
||||
// 'cookie': savedCookie
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
var rule = {
|
||||
类型: '影视',
|
||||
title: '剧巴巴',
|
||||
host: 'https://www.jubaba.cc',
|
||||
headers: {'User-Agent': 'MOBILE_UA'},
|
||||
编码: 'utf-8',
|
||||
timeout: 5000,
|
||||
homeUrl: '/',
|
||||
url: '/vodshow/fyclass--------fypage---.html',
|
||||
detailUrl: '',
|
||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||
searchable: 1,
|
||||
quickSearch: 1,
|
||||
filterable: 1,
|
||||
class_name: '电影&剧集&综艺&动漫',
|
||||
class_url: '1&2&3&4',
|
||||
play_parse: true,
|
||||
lazy: $js.toString(() => {
|
||||
let pclick = 'document.querySelector("#playleft iframe").contentWindow.document.querySelector("#start").click()';
|
||||
input = {
|
||||
parse: 1,
|
||||
url: input,
|
||||
js: pclick,
|
||||
click: pclick
|
||||
}
|
||||
}),
|
||||
limit: 9,
|
||||
double: false,
|
||||
推荐: $js.toString(() => {
|
||||
// 调用verifyBox获取验证结果
|
||||
let result = globalThis.verifyBox(MY_URL);
|
||||
|
||||
// 从结果中提取cookie和页面内容
|
||||
let html = result.content;
|
||||
let phpsessid = result.cookie;
|
||||
|
||||
// 如果有有效的cookie,将其保存到全局变量或localStorage中供后续使用
|
||||
if (phpsessid && phpsessid.trim() !== '') {
|
||||
// 保存到全局变量,后续的verifyBox调用会检查这个变量
|
||||
globalThis.savedPhpSessionId = phpsessid;
|
||||
|
||||
// 也可以更新rule.headers中的cookie,让后续请求自动使用
|
||||
if (!rule.headers.cookie) {
|
||||
rule.headers.cookie = '';
|
||||
}
|
||||
// 更新或添加PHPSESSID到cookie
|
||||
let cookieStr = rule.headers.cookie;
|
||||
if (cookieStr.includes('PHPSESSID=')) {
|
||||
// 替换已有的PHPSESSID
|
||||
cookieStr = cookieStr.replace(/PHPSESSID=[^;]+/, phpsessid);
|
||||
} else {
|
||||
// 添加新的PHPSESSID
|
||||
cookieStr += (cookieStr ? '; ' : '') + phpsessid;
|
||||
}
|
||||
rule.headers.cookie = cookieStr;
|
||||
}
|
||||
|
||||
let d = [];
|
||||
let list = pdfa(html, '.lazyload');
|
||||
list.forEach(it => {
|
||||
let title = pdfh(it, '.lazyload&&title');
|
||||
let href = pdfh(it, 'a&&href');
|
||||
let pic = pdfh(it, '.lazyload&&data-original');
|
||||
let remark = pdfh(it, '.text-right&&Text') || '';
|
||||
let score = pdfh(it, '.pic-tag-h&&Text') || '';
|
||||
d.push({
|
||||
title: title,
|
||||
img: pic,
|
||||
desc: remark + ' ' + score,
|
||||
url: href
|
||||
});
|
||||
});
|
||||
setResult(d);
|
||||
}),
|
||||
一级: $js.toString(() => {
|
||||
// 调用verifyBox获取验证结果
|
||||
let result = globalThis.verifyBox(MY_URL);
|
||||
|
||||
// 从结果中提取cookie和页面内容
|
||||
let html = result.content;
|
||||
let phpsessid = result.cookie;
|
||||
|
||||
// 如果有有效的cookie,将其保存到全局变量或localStorage中供后续使用
|
||||
if (phpsessid && phpsessid.trim() !== '') {
|
||||
// 保存到全局变量,后续的verifyBox调用会检查这个变量
|
||||
globalThis.savedPhpSessionId = phpsessid;
|
||||
|
||||
// 也可以更新rule.headers中的cookie,让后续请求自动使用
|
||||
if (!rule.headers.cookie) {
|
||||
rule.headers.cookie = '';
|
||||
}
|
||||
// 更新或添加PHPSESSID到cookie
|
||||
let cookieStr = rule.headers.cookie;
|
||||
if (cookieStr.includes('PHPSESSID=')) {
|
||||
// 替换已有的PHPSESSID
|
||||
cookieStr = cookieStr.replace(/PHPSESSID=[^;]+/, phpsessid);
|
||||
} else {
|
||||
// 添加新的PHPSESSID
|
||||
cookieStr += (cookieStr ? '; ' : '') + phpsessid;
|
||||
}
|
||||
rule.headers.cookie = cookieStr;
|
||||
}
|
||||
|
||||
let d = [];
|
||||
let list = pdfa(html, '.ewave-vodlist li');
|
||||
list.forEach(it => {
|
||||
let title = pdfh(it, '.title&&Text');
|
||||
let href = pdfh(it, 'a.thumb-link&&href');
|
||||
let pic = pdfh(it, '.ewave-vodlist__thumb&&data-original');
|
||||
let remark = pdfh(it, '.pic-text&&Text') || '';
|
||||
let score = pdfh(it, '.pic-tag-h&&Text') || '';
|
||||
d.push({
|
||||
title: title,
|
||||
img: pic,
|
||||
desc: remark + ' ' + score,
|
||||
url: href
|
||||
});
|
||||
});
|
||||
setResult(d);
|
||||
}),
|
||||
二级: {
|
||||
title: 'h1&&span:eq(0)&&Text;.data--span:eq(0)&&Text',
|
||||
img: 'img.lazyload&&data-original',
|
||||
desc: '.v-thumb&&span&&Text;.data:eq(0)&&a:eq(-1)&&Text;.data:eq(0)&&a:eq(-2)&&Text;.data--span:eq(1)&&Text;.data--span:eq(2)&&Text',
|
||||
content: 'meta[name^=description]&&content',
|
||||
tabs: '.nav-tabs&&a',
|
||||
tab_text: 'body&&Text',
|
||||
lists: '.ewave-content__playlist:eq(#id)&&a',
|
||||
list_text: 'body&&Text',
|
||||
list_url: 'a&&href',
|
||||
},
|
||||
搜索: '*',
|
||||
}
|
||||
@@ -0,0 +1,375 @@
|
||||
// DJ多多APP - drpy2规则 (完整确定版)
|
||||
// 添加详细日志调试
|
||||
|
||||
const DJ_HOST1 = 'https://new.djduoduo.com';
|
||||
const DJ_HOST2 = 'http://bdcdn.djduoduo.com';
|
||||
const DJ_HOST3 = 'http://hscdn.dianyinduoduo.com';
|
||||
|
||||
const DJ_CKEY = 'e82a4a775c295bbbe33f66828a368b90';
|
||||
const DJ_CIV = '8477d5a085c1d50d8a74811ec3e811e4';
|
||||
const DJ_DKEY = 'e4fd094dfcae98f352ddf81ee760d891';
|
||||
const DJ_DIV = '932ea49cfff68382f0516ccc63a52123';
|
||||
|
||||
const DJ_EXTRA = {
|
||||
"VerCode": 3966,
|
||||
"Ver": "3.9.66",
|
||||
"Channel": "Car",
|
||||
"Platform": "Android",
|
||||
"OSVer": 31,
|
||||
"Did": "120611636433",
|
||||
"AppId": 128,
|
||||
"Ts": 0,
|
||||
"VTs": 0
|
||||
};
|
||||
|
||||
// 全局函数注册
|
||||
globalThis.DJEncrypt = function(str) {
|
||||
let key = CryptoJS.enc.Hex.parse(DJ_CKEY);
|
||||
let iv = CryptoJS.enc.Hex.parse(DJ_CIV);
|
||||
return CryptoJS.AES.encrypt(str, key, {
|
||||
iv: iv,
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
}).toString();
|
||||
};
|
||||
|
||||
globalThis.DJDecrypt = function(str) {
|
||||
try {
|
||||
let key = CryptoJS.enc.Hex.parse(DJ_DKEY);
|
||||
let iv = CryptoJS.enc.Hex.parse(DJ_DIV);
|
||||
let decrypted = CryptoJS.AES.decrypt(str, key, {
|
||||
iv: iv,
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
return decrypted.toString(CryptoJS.enc.Utf8);
|
||||
} catch(e) {
|
||||
log('DJDecrypt失败: ' + e.message + ', 输入: ' + str);
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
globalThis.DJGetData = function(path, dataObj) {
|
||||
let data = encodeURIComponent(DJEncrypt(JSON.stringify(dataObj)));
|
||||
let extra = encodeURIComponent(DJEncrypt(JSON.stringify(DJ_EXTRA)));
|
||||
let url = DJ_HOST1 + path + '&data=' + data + '&extra=' + extra;
|
||||
try {
|
||||
return JSON.parse(request(url, {headers: {'User-Agent': 'MOBILE_UA'}}));
|
||||
} catch(e) {
|
||||
log('DJGetData失败: ' + e.message);
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
globalThis.DJGetImg = function(item) {
|
||||
if (!item.Cover) return 'https://icdn.binmt.cc/2506/6847a82912a35.png';
|
||||
let id1 = String(item.Id).slice(-3);
|
||||
return item.Cover.indexOf('/dj/') >= 0 ? DJ_HOST2 + item.Cover : DJ_HOST2 + '/dj/cover/' + id1 + '/150/' + item.Cover;
|
||||
};
|
||||
|
||||
globalThis.DJGetSonglistImg = function(item) {
|
||||
if (!item.Cover) return '';
|
||||
return item.Cover.indexOf('/dj/') >= 0 ? DJ_HOST2 + item.Cover : DJ_HOST2 + '/img/songlist/cover/' + String(item.Id).slice(-3) + '/150/' + item.Cover;
|
||||
};
|
||||
|
||||
globalThis.DJGetVideoImg = function(item) {
|
||||
return DJ_HOST2 + '/v/cover/' + String(item.Id).slice(-3) + '/150/' + item.Cover;
|
||||
};
|
||||
|
||||
// 构建音频URL(带解密)
|
||||
globalThis.DJBuildAudioUrl = function(songId, path) {
|
||||
log('DJBuildAudioUrl 输入: songId=' + songId + ', path=' + path);
|
||||
let id1 = String(songId).slice(-3);
|
||||
let decryptedPath = DJDecrypt(path);
|
||||
log('DJBuildAudioUrl 解密后: ' + decryptedPath);
|
||||
if (!decryptedPath) return '';
|
||||
return DJ_HOST2 + '/dj/' + id1 + '/' + decryptedPath;
|
||||
};
|
||||
|
||||
// 构建视频URL(带解密)
|
||||
globalThis.DJBuildVideoUrl = function(vid, path) {
|
||||
log('DJBuildVideoUrl 输入: vid=' + vid + ', path=' + path);
|
||||
let id1 = String(vid).slice(-3);
|
||||
if (path.indexOf('.') >= 0) {
|
||||
return DJ_HOST3 + '/v/480p/' + id1 + '/' + path;
|
||||
}
|
||||
let decryptedPath = DJDecrypt(path);
|
||||
log('DJBuildVideoUrl 解密后: ' + decryptedPath);
|
||||
if (!decryptedPath) return '';
|
||||
return DJ_HOST3 + '/v/480p/' + id1 + '/' + decryptedPath;
|
||||
};
|
||||
|
||||
var rule = {
|
||||
title: 'DJ多多',
|
||||
host: DJ_HOST1,
|
||||
url: 'js:',
|
||||
detailUrl: 'js:',
|
||||
searchUrl: 'js:',
|
||||
searchable: 2,
|
||||
quickSearch: 1,
|
||||
filterable: 0,
|
||||
headers: {'User-Agent': 'MOBILE_UA'},
|
||||
timeout: 5000,
|
||||
class_name: '热歌&3D&电音&车载&无损&新歌&原创&中文&伤感&铃声&老歌&DJ&歌单&频道&乐库&视频&排行',
|
||||
class_url: 'hot_v2&100&105&104&sq&new&ori&107&103&109&108&101&songlist&channel&yueku&video&rank',
|
||||
|
||||
推荐: `js:
|
||||
let d = [];
|
||||
let html = DJGetData('/v4/getlist.php?act=hot_v2', {'PageNo': 0});
|
||||
if (html.List) {
|
||||
html.List.forEach(function(item) {
|
||||
d.push({
|
||||
title: item.Name,
|
||||
desc: (item.User || '未知') + ' • ' + (item.Duration / 60).toFixed(2) + '分 • 播放' + (item.PlCntAll || 0),
|
||||
pic_url: DJGetImg(item),
|
||||
url: item.Id + '#' + item.Path
|
||||
});
|
||||
});
|
||||
}
|
||||
setResult(d);
|
||||
`,
|
||||
|
||||
一级: `js:
|
||||
let d = [];
|
||||
let page = parseInt(MY_PAGE) - 1;
|
||||
let tid = MY_CATE;
|
||||
|
||||
if (tid === 'songlist') {
|
||||
let html = DJGetData('/v4/getlist.php?act=hot_songlist', {'PageNo': page});
|
||||
if (html.List) {
|
||||
html.List.forEach(function(item) {
|
||||
d.push({
|
||||
title: item.Name,
|
||||
desc: '歌单',
|
||||
pic_url: DJGetSonglistImg(item),
|
||||
url: 'songlist#' + item.Id
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (tid === 'channel') {
|
||||
let html = DJGetData('/v4/getlist.php?act=chnlist', {'Id': 2});
|
||||
if (html.List) {
|
||||
html.List.forEach(function(item) {
|
||||
d.push({
|
||||
title: item.Name,
|
||||
desc: '频道',
|
||||
pic_url: DJ_HOST2 + item.Cover,
|
||||
url: 'channel#' + item.Id
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (tid === 'yueku') {
|
||||
let html = DJGetData('/v4/getlist.php?act=cat', {'Id': 1, 'PageNo': page, 'Type': 'Up'});
|
||||
if (html.List) {
|
||||
html.List.forEach(function(item) {
|
||||
d.push({
|
||||
title: item.Name,
|
||||
desc: (item.User || '未知') + ' • ' + (item.Duration / 60).toFixed(2) + '分',
|
||||
pic_url: DJGetImg(item),
|
||||
url: item.Id + '#' + item.Path
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (tid === 'video') {
|
||||
let html = DJGetData('/v4/getlist.php?act=new_svideo', {'PageNo': page});
|
||||
if (html.List) {
|
||||
html.List.forEach(function(item) {
|
||||
d.push({
|
||||
title: item.Desc || '视频',
|
||||
desc: 'DJ视频',
|
||||
pic_url: DJGetVideoImg(item),
|
||||
url: 'video#' + item.Id + '#' + item.Path
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (tid === 'rank') {
|
||||
let html = DJGetData('/v4/getlist.php?act=rank_detail', {'Id': 100, 'PageNo': page});
|
||||
if (html.List) {
|
||||
html.List.forEach(function(item) {
|
||||
d.push({
|
||||
title: item.Name,
|
||||
desc: (item.User || '未知') + ' • 播放' + (item.PlCntAll || 0),
|
||||
pic_url: DJGetImg(item),
|
||||
url: item.Id + '#' + item.Path
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
let act = /^[0-9]/.test(tid) ? 'homechn' : tid;
|
||||
let data1 = /^[0-9]/.test(tid) ? {'Id': parseInt(tid), 'PageNo': page} : {'PageNo': page};
|
||||
let html = DJGetData('/v4/getlist.php?act=' + act, data1);
|
||||
if (html.List) {
|
||||
html.List.forEach(function(item) {
|
||||
d.push({
|
||||
title: item.Name,
|
||||
desc: (item.User || '未知') + ' • ' + (item.Duration / 60).toFixed(2) + '分 • 播放' + (item.PlCntAll || 0),
|
||||
pic_url: DJGetImg(item),
|
||||
url: item.Id + '#' + item.Path
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
setResult(d);
|
||||
`,
|
||||
|
||||
// 二级 - 使用 $js.toString 模式
|
||||
二级: $js.toString(() => {
|
||||
let id = orId;
|
||||
log('========== 二级开始 ==========');
|
||||
log('orId: ' + orId);
|
||||
|
||||
// 歌单详情
|
||||
if (id.indexOf('songlist#') === 0) {
|
||||
let songlistId = id.split('#')[1];
|
||||
log('歌单ID: ' + songlistId);
|
||||
let html = DJGetData('/v4/getlist.php?act=songlistdetail', {'Id': parseInt(songlistId), 'PageNo': 0});
|
||||
|
||||
if (html.List && html.List.length > 0) {
|
||||
let playUrls = html.List.map(function(item) {
|
||||
return item.Name + '$' + item.Id + '#' + item.Path;
|
||||
}).join('#');
|
||||
|
||||
VOD = {
|
||||
vod_name: '歌单列表',
|
||||
vod_play_from: 'DJ多多',
|
||||
vod_content: '共' + html.List.length + '首歌曲',
|
||||
vod_play_url: playUrls
|
||||
};
|
||||
log('歌单VOD: ' + JSON.stringify(VOD));
|
||||
} else {
|
||||
VOD = {
|
||||
vod_name: '空歌单',
|
||||
vod_play_from: 'DJ多多',
|
||||
vod_content: '暂无歌曲',
|
||||
vod_play_url: '暂无$#'
|
||||
};
|
||||
}
|
||||
}
|
||||
// 频道详情
|
||||
else if (id.indexOf('channel#') === 0) {
|
||||
let channelId = id.split('#')[1];
|
||||
log('频道ID: ' + channelId);
|
||||
let html = DJGetData('/v4/getlist.php?act=chn', {'Id': channelId, 'PageNo': 0, 'Type': 'Hot'});
|
||||
|
||||
if (html.List && html.List.length > 0) {
|
||||
let playUrls = html.List.map(function(item) {
|
||||
return item.Name + '$' + item.Id + '#' + item.Path;
|
||||
}).join('#');
|
||||
|
||||
VOD = {
|
||||
vod_name: '频道列表',
|
||||
vod_play_from: 'DJ多多',
|
||||
vod_content: '共' + html.List.length + '首歌曲',
|
||||
vod_play_url: playUrls
|
||||
};
|
||||
log('频道VOD: ' + JSON.stringify(VOD));
|
||||
} else {
|
||||
VOD = {
|
||||
vod_name: '空频道',
|
||||
vod_play_from: 'DJ多多',
|
||||
vod_content: '暂无歌曲',
|
||||
vod_play_url: '暂无$#'
|
||||
};
|
||||
}
|
||||
}
|
||||
// 视频
|
||||
else if (id.indexOf('video#') === 0) {
|
||||
log('视频: ' + id);
|
||||
VOD = {
|
||||
vod_name: 'DJ视频',
|
||||
vod_play_from: 'DJ多多',
|
||||
vod_content: '',
|
||||
vod_play_url: '播放$' + id
|
||||
};
|
||||
}
|
||||
// 普通歌曲
|
||||
else if (id.indexOf('#') > 0) {
|
||||
log('普通歌曲: ' + id);
|
||||
VOD = {
|
||||
vod_name: 'DJ音乐',
|
||||
vod_play_from: 'DJ多多',
|
||||
vod_content: '',
|
||||
vod_play_url: '播放$' + id
|
||||
};
|
||||
}
|
||||
else {
|
||||
log('未知类型: ' + id);
|
||||
VOD = {
|
||||
vod_name: '未知',
|
||||
vod_play_from: 'DJ多多',
|
||||
vod_content: '无法识别的ID: ' + id,
|
||||
vod_play_url: '错误$#'
|
||||
};
|
||||
}
|
||||
log('========== 二级结束 ==========');
|
||||
}),
|
||||
|
||||
搜索: `js:
|
||||
let d = [];
|
||||
let html = DJGetData('/v4/search.php?act=sch', {
|
||||
'Query': KEY,
|
||||
'From': 'HotSearch',
|
||||
'Uid': 9447509,
|
||||
'PageNo': 0
|
||||
});
|
||||
if (html.List) {
|
||||
html.List.forEach(function(item) {
|
||||
d.push({
|
||||
title: item.Name,
|
||||
desc: (item.User || '未知') + ' • ' + (item.Duration / 60).toFixed(2) + '分 • 播放' + (item.PlCntAll || 0),
|
||||
pic_url: DJGetImg(item),
|
||||
url: item.Id + '#' + item.Path
|
||||
});
|
||||
});
|
||||
}
|
||||
setResult(d);
|
||||
`,
|
||||
|
||||
// lazy - 带详细日志
|
||||
lazy: $js.toString(() => {
|
||||
log('========== lazy开始 ==========');
|
||||
log('input: ' + input);
|
||||
|
||||
let id = input;
|
||||
|
||||
// 处理 vod_play_url 格式:集名$链接
|
||||
if (id.indexOf('$') >= 0) {
|
||||
let parts = id.split('$');
|
||||
log('分割后: ' + JSON.stringify(parts));
|
||||
id = parts[1]; // 取链接部分
|
||||
}
|
||||
|
||||
log('处理后ID: ' + id);
|
||||
|
||||
let realUrl = '';
|
||||
|
||||
// 视频格式: video#id#path
|
||||
if (id.indexOf('video#') === 0) {
|
||||
let parts = id.split('#');
|
||||
log('视频ID分割: ' + JSON.stringify(parts));
|
||||
if (parts.length >= 3) {
|
||||
realUrl = DJBuildVideoUrl(parts[1], parts[2]);
|
||||
}
|
||||
}
|
||||
// 音频格式: id#path
|
||||
else if (id.indexOf('#') > 0) {
|
||||
let parts = id.split('#');
|
||||
log('音频ID分割: ' + JSON.stringify(parts));
|
||||
if (parts.length >= 2) {
|
||||
realUrl = DJBuildAudioUrl(parts[0], parts[1]);
|
||||
}
|
||||
}
|
||||
|
||||
log('最终URL: ' + realUrl);
|
||||
log('========== lazy结束 ==========');
|
||||
|
||||
input = realUrl ?
|
||||
{parse: 0, url: realUrl, header: {'User-Agent': 'MOBILE_UA'}} :
|
||||
{parse: 0, url: 'http://localhost/error.mp3', header: {}};
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
globalThis.verifyBox = function(url) {
|
||||
const encrypt = (str) => {
|
||||
const chars = "PXhw7UT1B0a9kQDKZsjIASmOezxYG4CHo5Jyfg2b8FLpEvRr3WtVnlqMidu6cN";
|
||||
const len = chars.length;
|
||||
const result = new Array(str.length * 3);
|
||||
|
||||
for (let i = 0, j = 0; i < str.length; i++, j += 3) {
|
||||
const char = str[i];
|
||||
const idx = chars.indexOf(char);
|
||||
|
||||
const r1 = Math.random() * len | 0;
|
||||
const r2 = Math.random() * len | 0;
|
||||
|
||||
result[j] = chars[r1];
|
||||
result[j + 1] = idx === -1 ? char : chars[(idx + 3) % len];
|
||||
result[j + 2] = chars[r2];
|
||||
}
|
||||
|
||||
return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(result.join('')));
|
||||
};
|
||||
var value = encrypt(url);
|
||||
var token = encrypt(/var token = encrypt\("([^"]+)"\)/);
|
||||
var data = 'value=' + encrypt(location.href) + '&token=' + encrypt(token);
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('post', '${rule.host}/robot.php', false);
|
||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
||||
xhr.send(data);
|
||||
|
||||
if (xhr.status >= 200 && xhr.status < 300 || xhr.status == 304) {
|
||||
setTimeout(function() { location.reload(); }, 1000);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
var rule = {
|
||||
类型: '影视',
|
||||
title: '剧巴巴',
|
||||
host: 'https://www.jubaba.cc',
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA'
|
||||
},
|
||||
编码: 'utf-8',
|
||||
timeout: 5000,
|
||||
homeUrl: '/',
|
||||
url: '/vodshow/fyclass--------fypage---.html',
|
||||
detailUrl: '',
|
||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||
searchable: 1,
|
||||
quickSearch: 1,
|
||||
filterable: 1,
|
||||
class_name: '电影&剧集&综艺&动漫',
|
||||
class_url: '1&2&3&4',
|
||||
play_parse: true,
|
||||
lazy: $js.toString(() => {
|
||||
let pclick = 'document.querySelector("#playleft iframe").contentWindow.document.querySelector("#start").click()';
|
||||
input = {
|
||||
parse: 1,
|
||||
url: input,
|
||||
js: pclick,
|
||||
click: pclick
|
||||
}
|
||||
}),
|
||||
limit: 9,
|
||||
double: false,
|
||||
推荐: '.lazyload;.lazyload&&title;.lazyload&&data-original;.text-right&&Text;a&&href',
|
||||
|
||||
一级: $js.toString(() => {
|
||||
let cookie = getItem(RULE_CK, '');
|
||||
//log('储存的cookie:' + cookie);
|
||||
let ret = request(MY_URL, {
|
||||
headers: {
|
||||
Referer: encodeUrl(MY_URL),
|
||||
Cookie: cookie,
|
||||
}
|
||||
});
|
||||
if (/人机验证/.test(ret)) {
|
||||
//log(ret);
|
||||
cookie = globalThis.verifyBox(MY_URL);
|
||||
if (cookie) {
|
||||
log(`本次成功过验证,cookie:${cookie}`);
|
||||
setItem(RULE_CK, cookie);
|
||||
} else {
|
||||
log(`本次验证失败,cookie:${cookie}`);
|
||||
}
|
||||
ret = request(MY_URL, {
|
||||
headers: {
|
||||
Referer: encodeUrl(MY_URL),
|
||||
Cookie: cookie,
|
||||
}
|
||||
});
|
||||
}
|
||||
let d = [];
|
||||
let list = pdfa(ret, '.ewave-vodlist li');
|
||||
list.forEach(it => {
|
||||
let title = pdfh(it, '.title&&Text');
|
||||
let href = pdfh(it, 'a.thumb-link&&href');
|
||||
let pic = pdfh(it, '.ewave-vodlist__thumb&&data-original');
|
||||
let remark = pdfh(it, '.pic-text&&Text') || '';
|
||||
let score = pdfh(it, '.pic-tag-h&&Text') || '';
|
||||
|
||||
d.push({
|
||||
title: title,
|
||||
img: pic,
|
||||
desc: remark + ' ' + score,
|
||||
url: href
|
||||
});
|
||||
});
|
||||
setResult(d);
|
||||
}),
|
||||
二级: {
|
||||
title: 'h1&&span:eq(0)&&Text;.data--span:eq(0)&&Text',
|
||||
img: 'img.lazyload&&data-original',
|
||||
desc: '.v-thumb&&span&&Text;.data:eq(0)&&a:eq(-1)&&Text;.data:eq(0)&&a:eq(-2)&&Text;.data--span:eq(1)&&Text;.data--span:eq(2)&&Text',
|
||||
content: 'meta[name^=description]&&content',
|
||||
tabs: '.nav-tabs&&a',
|
||||
tab_text: 'body&&Text',
|
||||
lists: '.ewave-content__playlist:eq(#id)&&a',
|
||||
list_text: 'body&&Text',
|
||||
list_url: 'a&&href',
|
||||
},
|
||||
搜索: '*',
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
globalThis.verifyBox = function(HOST, rule) {
|
||||
const firstRes = request(HOST, {
|
||||
headers: rule.headers,
|
||||
withHeaders: true,
|
||||
redirect: false,
|
||||
method: 'GET'
|
||||
});
|
||||
const res = typeof firstRes === 'string' ? JSON.parse(firstRes) : firstRes;
|
||||
const html = res.body || firstRes;
|
||||
if (!html.includes('人机验证') && !html.includes('防火墙正在检查您的访问')) {
|
||||
return html;
|
||||
}
|
||||
const setCookie = res['set-cookie'] || '';
|
||||
let phpsessid = '';
|
||||
if (Array.isArray(setCookie)) {
|
||||
for (const c of setCookie) {
|
||||
if (c.includes('PHPSESSID')) {
|
||||
phpsessid = c.split(';')[0].trim();
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (setCookie.includes('PHPSESSID')) {
|
||||
phpsessid = setCookie.split(';')[0].trim();
|
||||
}
|
||||
if (phpsessid) {
|
||||
rule.headers.cookie = phpsessid;
|
||||
if (typeof rule_fetch_params !== 'undefined') {
|
||||
rule_fetch_params.headers = {...rule.headers};
|
||||
}
|
||||
}
|
||||
const tokenMatch = html.match(/var token = encrypt\("([^"]+)"\)/);
|
||||
if (!tokenMatch) return html;
|
||||
const encrypt = (str) => {
|
||||
const staticchars = "PXhw7UT1B0a9kQDKZsjIASmOezxYG4CHo5Jyfg2b8FLpEvRr3WtVnlqMidu6cN";
|
||||
let encodechars = "";
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
const idx = staticchars.indexOf(str[i]);
|
||||
const code = idx === -1 ? str[i] : staticchars[(idx + 3) % 62];
|
||||
encodechars += staticchars[Math.floor(Math.random() * 62)] +
|
||||
code +
|
||||
staticchars[Math.floor(Math.random() * 62)];
|
||||
}
|
||||
try {
|
||||
return btoa(encodechars);
|
||||
} catch (e) {
|
||||
if (typeof Buffer !== 'undefined') {
|
||||
return Buffer.from(encodechars).toString('base64');
|
||||
}
|
||||
return encodechars;
|
||||
}
|
||||
};
|
||||
const value = encrypt(HOST);
|
||||
const token = encrypt(tokenMatch[1]);
|
||||
const postData = `value=${value}&token=${token}`;
|
||||
const verifyRes = request(`${rule.host}/robot.php`, {
|
||||
headers: {
|
||||
...rule.headers,
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
'origin': rule.host,
|
||||
'referer': HOST
|
||||
},
|
||||
withHeaders: true,
|
||||
method: 'POST',
|
||||
body: postData
|
||||
});
|
||||
const verifyJson = typeof verifyRes === 'string' ? JSON.parse(verifyRes) : verifyRes;
|
||||
let verifyBody;
|
||||
if (typeof verifyJson.body === 'string') {
|
||||
try {
|
||||
verifyBody = JSON.parse(verifyJson.body);
|
||||
} catch {
|
||||
verifyBody = {msg: 'error'};
|
||||
}
|
||||
} else {
|
||||
verifyBody = verifyJson.body || verifyJson;
|
||||
}
|
||||
if (verifyBody.msg === 'ok') {
|
||||
const start = Date.now();
|
||||
while (Date.now() - start < 1500) {}
|
||||
const finalRes = request(HOST, {
|
||||
headers: rule.headers,
|
||||
withHeaders: false,
|
||||
redirect: false,
|
||||
method: 'GET'
|
||||
});
|
||||
return typeof finalRes === 'string' ? finalRes : (finalRes.body || finalRes);
|
||||
}
|
||||
return html;
|
||||
};
|
||||
|
||||
var rule = {
|
||||
类型: '影视',
|
||||
title: '剧巴巴',
|
||||
host: 'https://www.jubaba.cc',
|
||||
headers: {'User-Agent': 'MOBILE_UA'},
|
||||
编码: 'utf-8',
|
||||
timeout: 5000,
|
||||
homeUrl: '/',
|
||||
url: '/vodshow/fyclass--------fypage---.html',
|
||||
detailUrl: '',
|
||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||
searchable: 1,
|
||||
quickSearch: 1,
|
||||
filterable: 1,
|
||||
class_name: '电影&剧集&综艺&动漫',
|
||||
class_url: '1&2&3&4',
|
||||
play_parse: true,
|
||||
lazy: $js.toString(() => {
|
||||
let pclick = 'document.querySelector("#playleft iframe").contentWindow.document.querySelector("#start").click()';
|
||||
input = {
|
||||
parse: 1,
|
||||
url: input,
|
||||
js: pclick,
|
||||
click: pclick
|
||||
}
|
||||
}),
|
||||
limit: 9,
|
||||
double: false,
|
||||
推荐: '.lazyload;.lazyload&&title;.lazyload&&data-original;.text-right&&Text;a&&href',
|
||||
一级: $js.toString(() => {
|
||||
let html = globalThis.verifyBox(input, rule);
|
||||
let d = [];
|
||||
let list = pdfa(html, '.ewave-vodlist li');
|
||||
list.forEach(it => {
|
||||
let title = pdfh(it, '.title&&Text');
|
||||
let href = pdfh(it, 'a.thumb-link&&href');
|
||||
let pic = pdfh(it, '.ewave-vodlist__thumb&&data-original');
|
||||
let remark = pdfh(it, '.pic-text&&Text') || '';
|
||||
let score = pdfh(it, '.pic-tag-h&&Text') || '';
|
||||
|
||||
d.push({
|
||||
title: title,
|
||||
img: pic,
|
||||
desc: remark + ' ' + score,
|
||||
url: href
|
||||
});
|
||||
});
|
||||
setResult(d);
|
||||
}),
|
||||
二级: {
|
||||
title: 'h1&&span:eq(0)&&Text;.data--span:eq(0)&&Text',
|
||||
img: 'img.lazyload&&data-original',
|
||||
desc: '.v-thumb&&span&&Text;.data:eq(0)&&a:eq(-1)&&Text;.data:eq(0)&&a:eq(-2)&&Text;.data--span:eq(1)&&Text;.data--span:eq(2)&&Text',
|
||||
content: 'meta[name^=description]&&content',
|
||||
tabs: '.nav-tabs&&a',
|
||||
tab_text: 'body&&Text',
|
||||
lists: '.ewave-content__playlist:eq(#id)&&a',
|
||||
list_text: 'body&&Text',
|
||||
list_url: 'a&&href',
|
||||
},
|
||||
搜索: '*',
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
var rule = {
|
||||
//定义获取图片地址域名变量
|
||||
img_host: '',
|
||||
author: '小可乐/2509/第二版',
|
||||
title: '可可影视',
|
||||
类型: '影视',
|
||||
//host: 'https://www.kkys04.com',
|
||||
host: 'https://www.keke5.app',
|
||||
hostJs: '',
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
"Referer":"https://www.keke5.app/"
|
||||
},
|
||||
编码: 'utf-8',
|
||||
timeout: 5000,
|
||||
homeUrl: '/',
|
||||
url: '/show/fyclass-fyfilter-fypage.html',
|
||||
filter_url: '{{fl.class}}-{{fl.area}}-{{fl.lang}}-{{fl.year}}-{{fl.by}}',
|
||||
searchUrl: '/search?k=**&page=fypage&t=',
|
||||
detailUrl: '',
|
||||
limit: 9,
|
||||
double: false,
|
||||
class_name: '电影&剧集&综艺&动漫&短剧',
|
||||
class_url: '1&2&4&3&6',
|
||||
预处理: $js.toString(() => {
|
||||
const sha1ToUint8ArrayLatin1 = str => {
|
||||
if (typeof str !== 'string') {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
let latin1Str = CryptoJS.SHA1(str).toString(CryptoJS.enc.Latin1);
|
||||
let u8Array = Uint8Array.from(latin1Str, char => char.charCodeAt(0));
|
||||
return u8Array;
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
let hashPre = request(HOST)?.match(/a0_0x2a54\s*=\s*\[['"]([^'"]+)['"]/)?.[1]?.trim() ?? '';
|
||||
if (hashPre != '' && hashPre != getItem('hashpre')) {
|
||||
setItem('tgcookie', '');
|
||||
setItem('hashpre', '');
|
||||
let hashIdx = parseInt('0x' + hashPre[0], 16);
|
||||
if (Number.isInteger(hashIdx) && hashIdx >= 0 && hashIdx <= 18) {
|
||||
let cookieFound = false;
|
||||
let maxLoop = 100000;
|
||||
for (let i = 0; i < maxLoop && !cookieFound; i++) {
|
||||
let hashInput = `${hashPre}${i}`;
|
||||
let sha1Arr = sha1ToUint8ArrayLatin1(hashInput);
|
||||
if (sha1Arr && sha1Arr[hashIdx] === 0xb0 && sha1Arr[hashIdx + 1] === 0x0b) {
|
||||
let defendCookie = `cdndefend_js_cookie=${hashInput}`;
|
||||
setItem('hashpre', hashPre);
|
||||
setItem('tgcookie', defendCookie);
|
||||
cookieFound = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (getItem('tgcookie')) {
|
||||
rule_fetch_params.headers['cookie'] = getItem('tgcookie');
|
||||
}
|
||||
let khtml = fetch(HOST, {
|
||||
headers: rule_fetch_params.headers
|
||||
});
|
||||
let tValue = khtml.match(/<input[^>]*name="t"[^>]*value="([^"]*)"/i);
|
||||
if (tValue && tValue[1]) {
|
||||
rule.searchUrl = rule.searchUrl + encodeURIComponent(tValue[1]);
|
||||
}
|
||||
let scripts = pdfa(khtml, 'script');
|
||||
let img_script = scripts.find((it) => pdfh(it, 'script&&src').includes('rdul.js'));
|
||||
if (img_script) {
|
||||
let img_url = img_script.match(/src="(.*?)"/)[1];
|
||||
let img_html = fetch(img_url);
|
||||
rule.img_host = img_html.match(/'(.*?)'/)[1];
|
||||
rule.图片替换 = HOST + '=>' + rule.img_host;
|
||||
}
|
||||
}),
|
||||
推荐: '*',
|
||||
一级: '.module-item;.v-item-title:eq(1)&&Text;img:eq(-1)&&data-original;span:eq(-1)&&Text;a&&href',
|
||||
搜索: $js.toString(() => {
|
||||
let t = pdfh(fetch(input), 'input:eq(0)&&value');
|
||||
input = input.split('?')[0];
|
||||
let surl = `${input}?k=${KEY}&page=${MY_PAGE}&t=${t}`;
|
||||
let khtml = fetch(surl);
|
||||
VODS = [];
|
||||
let klists = pdfa(khtml, '.search-result-item');
|
||||
klists.forEach((it) => {
|
||||
VODS.push({
|
||||
vod_name: pdfh(it, 'img&&alt'),
|
||||
vod_pic: pd(it, 'img&&data-original', rule.img_host),
|
||||
vod_remarks: pdfh(it, '.search-result-item-header&&Text'),
|
||||
vod_id: pdfh(it, 'a&&href')
|
||||
});
|
||||
});
|
||||
}),
|
||||
二级: {
|
||||
title: '.detail-title&&strong:eq(1)&&Text;.detail-tags&&Text',
|
||||
img: '.detail-pic&&img&&data-original',
|
||||
desc: '.detail-info-row-main:eq(-2)&&Text;.detail-tags-item:eq(0)&&Text;.detail-tags-item:eq(1)&&Text;.detail-info-row-main:eq(1)&&Text;.detail-info-row-main:eq(0)&&Text',
|
||||
content: '.detail-desc&&Text',
|
||||
tabs: '.source-item',
|
||||
tab_text: 'span:eq(-1)&&Text',
|
||||
lists: '.episode-list:eq(#id)&&a',
|
||||
list_text: 'body&&Text',
|
||||
list_url: 'a&&href',
|
||||
},
|
||||
tab_remove: ['4K(高峰不卡)'],
|
||||
play_parse: true,
|
||||
lazy: $js.toString(() => {
|
||||
let kurl = input;
|
||||
let khtml = request(kurl);
|
||||
if (/dujia/.test(khtml)) {
|
||||
kurl = khtml.split("PPPP = '")[1].split("';")[0];
|
||||
const key = CryptoJS.enc.Utf8.parse('Isu7fOAvI6!&IKpAbVdhf&^F');
|
||||
const dataObj = {
|
||||
ciphertext: CryptoJS.enc.Base64.parse(kurl)
|
||||
};
|
||||
const decrypted = CryptoJS.AES.decrypt(dataObj, key, {
|
||||
mode: CryptoJS.mode.ECB,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
kurl = decrypted.toString(CryptoJS.enc.Utf8);
|
||||
} else {
|
||||
kurl = khtml.split('src: "')[1].split('",')[0];
|
||||
}
|
||||
input = {
|
||||
jx: 0,
|
||||
parse: 0,
|
||||
url: kurl,
|
||||
header: rule.headers
|
||||
};
|
||||
}),
|
||||
filter: 'H4sIAAAAAAAAA+2Z308bRxDH3/1XVH7mwQba4rz1oZUqVXlpHypFUeRWbhWVulJoqyKEZLANxhBskGPi2AVSMJgE/4Agx5yx/c/c3p3/i66ZndlzUk1OCYmU6l4Qn/nur9ud3ZldLwSC4eCtT+4EFoK/xOaDt4I/zkbn5oITwXj015hE+6wrdtcl/xmd/UMa7iwE49Is0rVhsjYySwguToD1duz3n2bv/6XMt7/87qtvvv6eVLF2bCXTSlRAWrEiLagBkJatmb0KagCo2Zkz3aYC1KylvJUoKk0BacmstfwENQBqM9u0e8+wTQDSjrfEZRc1AGpz+dQubmGbAPQN1VVdTwFpK9vD0glqANRm5rFprGGbAFRvc0XkzrEeAGm5Q+eA5hqAtEZbGHXUAFAzr/adRktpCmgs9SOzv49jAdDahpPZJe0aaM726vbaKs4ZgGtt7UJXr+0ISEsN7OdV1ABQc5Y2RMVQmoLFu4sT5MbRB7Go9mJRaYkNw6MXi8PjYWkF56BTF+WeMmGJ4VHJ6jTHSiiTnv+WddkfbwNMNCv9TWnEWQGg2dypWpVTnE0A6nvvRNdTQLOyfqY1BdTmi0daU0Cj7b/UmgLSHraEcYQagG6z5W6z5a5ndi6HVE8BffvWrkh38NsBqL+XF051gP0BaG/Zt9YHcjHIYZCp10HK7u1YRVocYhpzKicriAxuOM1UolmQaO20sQSx69QRrYJI40bRTCtRHdg56eklXAxi6qX/Avo1DTqH3Cb65nTb7OIppmDM02ej8Z+1pzvNulNLePX0ck+Wx7YB6BvPD7WmwOVnWlPg8l2tKXD5rtYUuPzTVQ/A8xzMx6IPXLv98sLs9jzOwWRo8lNlu/7XZZ/W9mm3fUrbp9z2SW2fdNvD2h5220PaHiJ7OHQ9/APSwqF78k+ECoReLRAaFQjpApHxAuFIJHRP/tEFZl4tMDMqMKMLWOULawc3yEj7PDI+3z/M69m2NreFkXtttu3ulchnsAvddCVhFXHfTLrNdhJXX0+q00yJDB7F06MxBO5OBGS995SxKPKSsXCZB5fNcNkFm0FwEZ3JkLhoz2VBXMYyClf0fQq8ZEhcxsJlOqMwR/0p8JKVyJNQr5ECL9khl5ENkz3RWcaxANxwVkLm4A1nJVzu8Lb5CJdXcPkIm3O8MXviMg8uY/GjqR9N/Wg6Hk2nbyya2sYz0XuEXg5AWmXPNAz7OIEyMQ2v0dK1FZCWOhO5A11bs6fXBe6mzMRq7jZslzvigC4AADTa7LJdbuBQAbzclLm44wzyMrJjmwCofRuLzv0WV5oCT68ZzM3cyu/ap5SLAJBWemJeUd4A4N++/djixxY/tozHlqkPdVPL1qzEknX1fOw1UZs8RQnuLZJ7n2ZObfZmxt2wuFsU8y7KndrsjZW5JXJRQrqC85RCOoCOkFmrhPcYBV5uunY353odBKB6+09Fmc4eANS+iN+XbgUS/O8ldprGuajnMVYA0Cn497b1GGdagb4/rss5xJEAeLmT/ued+4ZiJxe53hxX3y1qvtvt03+59l+u/XzIz4f+7/nQZ2+RD2mze/WHiRXnH/JIANoBhYpoYPxRQAMr5WW0wh0AQPVOBk47i/UAqL/Vh3ZhD/sD8JJVsb+YM3GSzVaYrIr9xZzL1NJt0UjqnTqCj3anflCPH7l2YPFflpCCHEkiAAA='
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
var rule = {
|
||||
类型:'影视',//影视|听书|漫画|小说
|
||||
title:'',
|
||||
host:'',
|
||||
url:'',
|
||||
searchUrl:'',
|
||||
searchable:2,
|
||||
quickSearch:0,
|
||||
filterable:1,
|
||||
filter:'',
|
||||
filter_url:'',
|
||||
filter_def:{},
|
||||
headers:{
|
||||
'User-Agent':'MOBILE_UA',
|
||||
},
|
||||
timeout:5000,
|
||||
class_parse:'#side-menu li;a&&Text;a&&href;/(.*?)\.html',
|
||||
cate_exclude:'',
|
||||
//class_name:'电影&电视剧&动漫&综艺',
|
||||
//class_url:'1&2&3&4',
|
||||
play_parse:true,
|
||||
lazy:$js.toString(()=>{
|
||||
input = {parse:1,url:input,js:''};
|
||||
}),
|
||||
double:true,
|
||||
推荐:'列表1;列表2;标题;图片;描述;链接;详情',
|
||||
一级:'列表;标题;图片;描述;链接;详情',
|
||||
二级:{
|
||||
title:'vod_name;vod_type',
|
||||
img:'图片链接',
|
||||
desc:'主要信息;年代;地区;演员;导演',
|
||||
content:'简介',
|
||||
tabs:'',
|
||||
lists:'xx:eq(#id)&&a',
|
||||
tab_text:'body&&Text',
|
||||
list_text:'body&&Text',
|
||||
list_url:'a&&href',
|
||||
list_url_prefix: '',
|
||||
},
|
||||
搜索:'列表;标题;图片;描述;链接;详情',
|
||||
}
|
||||
@@ -0,0 +1,502 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import json
|
||||
import base64
|
||||
import urllib.parse
|
||||
from Crypto.Cipher import AES
|
||||
from Crypto.Util.Padding import pad, unpad
|
||||
import binascii
|
||||
|
||||
from base.spider import Spider
|
||||
|
||||
|
||||
class Spider(Spider):
|
||||
"""DJ多多APP爬虫,适配TVBox接口"""
|
||||
|
||||
def __init__(self):
|
||||
# 固定参数
|
||||
self.host1 = "https://new.djduoduo.com"
|
||||
self.host2 = "http://bdcdn.djduoduo.com"
|
||||
self.host3 = "http://hscdn.dianyinduoduo.com"
|
||||
self.extra = {
|
||||
"VerCode": 3966,
|
||||
"Ver": "3.9.66",
|
||||
"Channel": "Car",
|
||||
"Platform": "Android",
|
||||
"OSVer": 31,
|
||||
"Did": "120611636433",
|
||||
"AppId": 128,
|
||||
"Ts": 0,
|
||||
"VTs": 0
|
||||
}
|
||||
# AES加密参数(用于请求data和extra)
|
||||
self.enc_key = binascii.unhexlify("e82a4a775c295bbbe33f66828a368b90")
|
||||
self.enc_iv = binascii.unhexlify("8477d5a085c1d50d8a74811ec3e811e4")
|
||||
# AES解密参数(用于播放地址解密)
|
||||
self.dec_key = binascii.unhexlify("e4fd094dfcae98f352ddf81ee760d891")
|
||||
self.dec_iv = binascii.unhexlify("932ea49cfff68382f0516ccc63a52123")
|
||||
|
||||
# 分类筛选默认值
|
||||
self.filter_defaults = {
|
||||
'tuijian': 'hot_v2',
|
||||
'gedan': 'hot_songlist',
|
||||
'pindao': 'Hot', # 频道内部热歌/新歌筛选
|
||||
'yueku': '1', # 乐库默认中文ID=1
|
||||
'shipin': 'new_svideo',
|
||||
'paihang': '100', # 排行默认多多飙升榜
|
||||
}
|
||||
|
||||
def aes_cbc_encrypt(self, data_str):
|
||||
"""AES/CBC/PKCS7加密,返回base64字符串"""
|
||||
cipher = AES.new(self.enc_key, AES.MODE_CBC, self.enc_iv)
|
||||
data_bytes = data_str.encode('utf-8')
|
||||
padded = pad(data_bytes, AES.block_size)
|
||||
encrypted = cipher.encrypt(padded)
|
||||
return base64.b64encode(encrypted).decode('utf-8')
|
||||
|
||||
def aes_cbc_decrypt(self, data_b64):
|
||||
"""AES/CBC/PKCS7解密,返回明文字符串"""
|
||||
cipher = AES.new(self.dec_key, AES.MODE_CBC, self.dec_iv)
|
||||
encrypted = base64.b64decode(data_b64)
|
||||
decrypted = cipher.decrypt(encrypted)
|
||||
unpadded = unpad(decrypted, AES.block_size)
|
||||
return unpadded.decode('utf-8')
|
||||
|
||||
def build_request_url(self, path, data_params):
|
||||
"""构建带加密参数的请求URL"""
|
||||
data_json = json.dumps(data_params, separators=(',', ':'))
|
||||
extra_json = json.dumps(self.extra, separators=(',', ':'))
|
||||
|
||||
data_enc = self.aes_cbc_encrypt(data_json)
|
||||
extra_enc = self.aes_cbc_encrypt(extra_json)
|
||||
|
||||
encoded_data = urllib.parse.quote(data_enc)
|
||||
encoded_extra = urllib.parse.quote(extra_enc)
|
||||
|
||||
return f"{self.host1}{path}&data={encoded_data}&extra={encoded_extra}"
|
||||
|
||||
def fetch_json(self, path, data_params):
|
||||
"""发送GET请求并解析JSON"""
|
||||
url = self.build_request_url(path, data_params)
|
||||
# 使用Spider自带的fetch方法
|
||||
resp = self.fetch(url)
|
||||
if resp and resp.status_code == 200:
|
||||
return resp.json()
|
||||
return {}
|
||||
|
||||
# ---------- 数据解析辅助函数 ----------
|
||||
def parse_song_item(self, item):
|
||||
"""解析单个歌曲项,返回TVBox列表项格式"""
|
||||
item_id = item.get('Id')
|
||||
if not item_id:
|
||||
return None
|
||||
id_str = str(item_id)
|
||||
id_suffix = id_str[-3:] # 取后三位用于拼图
|
||||
|
||||
# 封面图
|
||||
cover = item.get('Cover', '')
|
||||
if cover:
|
||||
if '/dj/' in cover:
|
||||
img = self.host2 + cover
|
||||
else:
|
||||
img = f"{self.host2}/dj/cover/{id_suffix}/150/{cover}"
|
||||
else:
|
||||
img = "https://icdn.binmt.cc/2506/6847a82912a35.png"
|
||||
|
||||
# 标题
|
||||
title = item.get('Name', '未知歌曲')
|
||||
# 描述(用户+时长+播放量)
|
||||
user = item.get('User', '')
|
||||
duration = item.get('Duration', 0)
|
||||
play_cnt = item.get('PlCntAll', 0)
|
||||
desc = f"{user} • {duration//60}:{duration%60:02d} • {play_cnt}"
|
||||
|
||||
# 播放地址需要解密Path字段
|
||||
path_enc = item.get('Path', '')
|
||||
if path_enc:
|
||||
try:
|
||||
real_path = self.aes_cbc_decrypt(path_enc)
|
||||
# 完整音频URL
|
||||
play_url = f"{self.host2}/dj/{id_suffix}/{real_path}"
|
||||
except:
|
||||
play_url = ""
|
||||
else:
|
||||
play_url = ""
|
||||
|
||||
vod = {
|
||||
"vod_id": f"music_{item_id}",
|
||||
"vod_name": title,
|
||||
"vod_pic": img,
|
||||
"vod_remarks": desc,
|
||||
"vod_content": desc,
|
||||
"vod_play_from": "DJ多多",
|
||||
"vod_play_url": f"播放${play_url}" if play_url else ""
|
||||
}
|
||||
return vod
|
||||
|
||||
def parse_video_item(self, item):
|
||||
"""解析视频项"""
|
||||
item_id = item.get('Id')
|
||||
id_str = str(item_id)
|
||||
id_suffix = id_str[-3:]
|
||||
cover = item.get('Cover', '')
|
||||
img = f"{self.host2}/v/cover/{id_suffix}/150/{cover}"
|
||||
title = item.get('Desc', '未知视频')
|
||||
path_enc = item.get('Path', '')
|
||||
if path_enc:
|
||||
try:
|
||||
real_path = self.aes_cbc_decrypt(path_enc)
|
||||
play_url = f"{self.host3}/v/480p/{id_suffix}/{real_path}"
|
||||
except:
|
||||
play_url = ""
|
||||
else:
|
||||
play_url = ""
|
||||
vod = {
|
||||
"vod_id": f"video_{item_id}",
|
||||
"vod_name": title,
|
||||
"vod_pic": img,
|
||||
"vod_remarks": "",
|
||||
"vod_content": "",
|
||||
"vod_play_from": "DJ多多",
|
||||
"vod_play_url": f"播放${play_url}" if play_url else ""
|
||||
}
|
||||
return vod
|
||||
|
||||
def parse_playlist_item(self, item):
|
||||
"""解析歌单项(用于分类列表)"""
|
||||
item_id = item.get('Id')
|
||||
name = item.get('Name', '未知歌单')
|
||||
cover = item.get('Cover', '')
|
||||
if cover:
|
||||
if '/dj/' in cover:
|
||||
img = self.host2 + cover
|
||||
else:
|
||||
id_suffix = str(item_id)[-3:] if item_id else '000'
|
||||
img = f"{self.host2}/img/songlist/cover/{id_suffix}/150/{cover}"
|
||||
else:
|
||||
img = "https://icdn.binmt.cc/2506/6847a82912a35.png"
|
||||
vod = {
|
||||
"vod_id": f"playlist_{item_id}",
|
||||
"vod_name": name,
|
||||
"vod_pic": img,
|
||||
"vod_remarks": "",
|
||||
"vod_content": "",
|
||||
"vod_play_from": "DJ多多",
|
||||
"vod_play_url": "" # 歌单本身无播放地址,需进入详情
|
||||
}
|
||||
return vod
|
||||
|
||||
# ---------- TVBox 必需接口 ----------
|
||||
def homeContent(self, filter):
|
||||
"""返回首页分类和推荐列表"""
|
||||
result = {}
|
||||
# 分类(模拟海阔视界顶部的几个icon)
|
||||
classes = [
|
||||
{'type_id': 'tuijian', 'type_name': '推荐'},
|
||||
{'type_id': 'gedan', 'type_name': '歌单'},
|
||||
{'type_id': 'pindao', 'type_name': '频道'},
|
||||
{'type_id': 'yueku', 'type_name': '乐库'},
|
||||
{'type_id': 'shipin', 'type_name': '视频'},
|
||||
{'type_id': 'paihang', 'type_name': '排行'},
|
||||
]
|
||||
|
||||
# 为每个分类添加filter定义
|
||||
# 推荐筛选
|
||||
classes[0]['filter'] = {
|
||||
'tj1': [
|
||||
{'n': '热歌', 'v': 'hot_v2'},
|
||||
{'n': '3D', 'v': '100'},
|
||||
{'n': '电音', 'v': '105'},
|
||||
{'n': '车载', 'v': '104'},
|
||||
{'n': '无损', 'v': 'sq'},
|
||||
{'n': '新歌', 'v': 'new'},
|
||||
{'n': '原创', 'v': 'ori'},
|
||||
{'n': '中文', 'v': '107'},
|
||||
{'n': '伤感', 'v': '103'},
|
||||
{'n': '铃声', 'v': '109'},
|
||||
{'n': '老歌', 'v': '108'},
|
||||
{'n': 'DJ', 'v': '101'},
|
||||
]
|
||||
}
|
||||
# 歌单筛选
|
||||
classes[1]['filter'] = {
|
||||
'gd_filter': [
|
||||
{'n': '最热', 'v': 'hot_songlist'},
|
||||
{'n': '最新', 'v': 'new_songlist'},
|
||||
{'n': '抖音', 'v': '10000'},
|
||||
{'n': '伤感', 'v': '10003'},
|
||||
{'n': '车载', 'v': '10007'},
|
||||
{'n': '蹦迪', 'v': '10012'},
|
||||
{'n': '3D', 'v': '10009'},
|
||||
{'n': '串烧', 'v': '10008'},
|
||||
]
|
||||
}
|
||||
# 频道筛选(热歌/新歌),频道ID固定为1(中文)
|
||||
classes[2]['filter'] = {
|
||||
'pd_filter': [
|
||||
{'n': '热歌', 'v': 'Hot'},
|
||||
{'n': '新歌', 'v': 'New'},
|
||||
]
|
||||
}
|
||||
# 乐库筛选
|
||||
classes[3]['filter'] = {
|
||||
'yk_filter': [
|
||||
{'n': '中文', 'v': '1'},
|
||||
{'n': '英文', 'v': '5'},
|
||||
{'n': '电音', 'v': '11'},
|
||||
{'n': 'MC喊麦', 'v': '3'},
|
||||
{'n': '长DJ', 'v': '29'},
|
||||
{'n': '电锯', 'v': '6'},
|
||||
{'n': '夜店', 'v': '14'},
|
||||
{'n': '铃声', 'v': '10'},
|
||||
{'n': '慢摇', 'v': '2'},
|
||||
{'n': '车载', 'v': '13'},
|
||||
{'n': '社会摇', 'v': '27'},
|
||||
{'n': '网友上传', 'v': '30'},
|
||||
{'n': '3D环绕', 'v': '31'},
|
||||
{'n': '现场', 'v': '16'},
|
||||
{'n': '节奏', 'v': '21'},
|
||||
{'n': 'House', 'v': '22'},
|
||||
{'n': '越南鼓', 'v': '23'},
|
||||
{'n': '舞曲', 'v': '8'},
|
||||
{'n': '加快', 'v': '24'},
|
||||
{'n': '苏荷', 'v': '18'},
|
||||
{'n': 'Remix', 'v': '25'},
|
||||
{'n': '氛围', 'v': '26'},
|
||||
{'n': 'RNB', 'v': '28'},
|
||||
{'n': '日韩', 'v': '9'},
|
||||
{'n': '串烧', 'v': '4'},
|
||||
]
|
||||
}
|
||||
# 视频筛选
|
||||
classes[4]['filter'] = {
|
||||
'sp_filter': [
|
||||
{'n': '新榜', 'v': 'new_svideo'},
|
||||
{'n': '热榜', 'v': 'hot_svideo'},
|
||||
{'n': '电音', 'v': '1010'},
|
||||
{'n': '歌曲', 'v': '1001'},
|
||||
{'n': '动漫', 'v': '1002'},
|
||||
{'n': '情感', 'v': '1003'},
|
||||
{'n': '美女', 'v': '1007'},
|
||||
{'n': '搞笑', 'v': '1005'},
|
||||
{'n': '正能量', 'v': '1006'},
|
||||
{'n': '沙雕', 'v': '1009'},
|
||||
]
|
||||
}
|
||||
# 排行筛选
|
||||
classes[5]['filter'] = {
|
||||
'ph_filter': [
|
||||
{'n': '多多飙升榜', 'v': '100'},
|
||||
{'n': '多多TOP500', 'v': '101'},
|
||||
{'n': '电音排行榜', 'v': '105'},
|
||||
{'n': '车载音乐榜', 'v': '110'},
|
||||
{'n': '多多分享榜', 'v': '104'},
|
||||
{'n': '中文舞曲榜', 'v': '107'},
|
||||
{'n': '英文舞曲榜', 'v': '108'},
|
||||
{'n': '串烧舞曲榜', 'v': '109'},
|
||||
]
|
||||
}
|
||||
|
||||
result['class'] = classes
|
||||
|
||||
# 首页推荐内容(第一页,act=hot_v2)
|
||||
data = self.fetch_json("/v4/getlist.php?act=hot_v2", {"PageNo": 0})
|
||||
vod_list = []
|
||||
if data and 'List' in data:
|
||||
for item in data['List']:
|
||||
vod = self.parse_song_item(item)
|
||||
if vod and vod.get('vod_play_url'):
|
||||
vod_list.append(vod)
|
||||
result['list'] = vod_list
|
||||
return result
|
||||
|
||||
def categoryContent(self, tid, pg=1, filter=False, extend=None):
|
||||
"""分类页面内容,支持filter筛选"""
|
||||
pg = int(pg) - 1 # 转换为0起始页码
|
||||
vod_list = []
|
||||
|
||||
# 获取筛选值,如果没有则使用默认
|
||||
if extend is None:
|
||||
extend = {}
|
||||
|
||||
# 根据tid构造请求参数
|
||||
if tid == 'tuijian':
|
||||
filter_val = extend.get('tj1', self.filter_defaults['tuijian'])
|
||||
if filter_val.isdigit():
|
||||
act = "homechn"
|
||||
data_params = {"Id": int(filter_val), "PageNo": pg}
|
||||
else:
|
||||
act = filter_val
|
||||
data_params = {"PageNo": pg}
|
||||
data = self.fetch_json(f"/v4/getlist.php?act={act}", data_params)
|
||||
if data and 'List' in data:
|
||||
for item in data['List']:
|
||||
vod = self.parse_song_item(item)
|
||||
if vod:
|
||||
vod_list.append(vod)
|
||||
|
||||
elif tid == 'gedan':
|
||||
filter_val = extend.get('gd_filter', self.filter_defaults['gedan'])
|
||||
if filter_val.isdigit():
|
||||
act = "chn_songlist"
|
||||
data_params = {"Id": int(filter_val), "PageNo": pg}
|
||||
else:
|
||||
act = filter_val
|
||||
data_params = {"PageNo": pg}
|
||||
data = self.fetch_json(f"/v4/getlist.php?act={act}", data_params)
|
||||
if data and 'List' in data:
|
||||
for item in data['List']:
|
||||
vod = self.parse_playlist_item(item)
|
||||
if vod:
|
||||
vod_list.append(vod)
|
||||
|
||||
elif tid == 'pindao':
|
||||
# 频道分类简化:固定使用频道ID=1(中文),筛选热歌/新歌
|
||||
filter_val = extend.get('pd_filter', self.filter_defaults['pindao'])
|
||||
# 频道ID固定为1
|
||||
data_params = {"Id": 1, "PageNo": pg, "Type": filter_val}
|
||||
data = self.fetch_json("/v4/getlist.php?act=chn", data_params)
|
||||
if data and 'List' in data:
|
||||
for item in data['List']:
|
||||
vod = self.parse_song_item(item)
|
||||
if vod:
|
||||
vod_list.append(vod)
|
||||
|
||||
elif tid == 'yueku':
|
||||
filter_val = extend.get('yk_filter', self.filter_defaults['yueku'])
|
||||
data_params = {"Id": int(filter_val), "PageNo": pg, "Type": "Up"}
|
||||
data = self.fetch_json("/v4/getlist.php?act=cat", data_params)
|
||||
if data and 'List' in data:
|
||||
for item in data['List']:
|
||||
vod = self.parse_song_item(item)
|
||||
if vod:
|
||||
vod_list.append(vod)
|
||||
|
||||
elif tid == 'shipin':
|
||||
filter_val = extend.get('sp_filter', self.filter_defaults['shipin'])
|
||||
if filter_val.isdigit():
|
||||
act = "chn_svideo"
|
||||
data_params = {"Id": int(filter_val), "PageNo": pg}
|
||||
else:
|
||||
act = filter_val
|
||||
data_params = {"PageNo": pg}
|
||||
data = self.fetch_json(f"/v4/getlist.php?act={act}", data_params)
|
||||
if data and 'List' in data:
|
||||
for item in data['List']:
|
||||
vod = self.parse_video_item(item)
|
||||
if vod:
|
||||
vod_list.append(vod)
|
||||
|
||||
elif tid == 'paihang':
|
||||
filter_val = extend.get('ph_filter', self.filter_defaults['paihang'])
|
||||
data_params = {"Id": int(filter_val), "PageNo": pg}
|
||||
data = self.fetch_json("/v4/getlist.php?act=rank_detail", data_params)
|
||||
if data and 'List' in data:
|
||||
for item in data['List']:
|
||||
vod = self.parse_song_item(item)
|
||||
if vod:
|
||||
vod_list.append(vod)
|
||||
|
||||
else:
|
||||
# 未知分类返回空
|
||||
pass
|
||||
|
||||
return {
|
||||
'page': pg + 1,
|
||||
'pagecount': 999, # 假设无限
|
||||
'limit': 20,
|
||||
'total': len(vod_list),
|
||||
'list': vod_list
|
||||
}
|
||||
|
||||
def detailContent(self, ids):
|
||||
"""详情页,支持歌曲ID和歌单ID"""
|
||||
vod_id = ids[0]
|
||||
vod_list = []
|
||||
|
||||
if vod_id.startswith('music_'):
|
||||
# 单个歌曲详情(从ID中提取原ID)
|
||||
real_id = vod_id.replace('music_', '')
|
||||
# 需要重新获取数据?简单起见,直接构造一个vod对象,但缺少详细信息
|
||||
# 可以尝试搜索或单独请求,这里返回一个占位
|
||||
vod = {
|
||||
"vod_id": vod_id,
|
||||
"vod_name": "未知歌曲",
|
||||
"vod_pic": "",
|
||||
"vod_remarks": "",
|
||||
"vod_content": "",
|
||||
"vod_play_from": "DJ多多",
|
||||
"vod_play_url": ""
|
||||
}
|
||||
vod_list.append(vod)
|
||||
|
||||
elif vod_id.startswith('playlist_'):
|
||||
# 歌单详情,需要请求歌单内歌曲列表
|
||||
playlist_id = vod_id.replace('playlist_', '')
|
||||
data = self.fetch_json("/v4/getlist.php?act=songlistdetail", {"Id": int(playlist_id), "PageNo": 0})
|
||||
songs = []
|
||||
if data and 'List' in data:
|
||||
for item in data['List']:
|
||||
song = self.parse_song_item(item)
|
||||
if song and song.get('vod_play_url'):
|
||||
# 提取播放地址,拼接到vod_play_url中
|
||||
songs.append(song)
|
||||
|
||||
if songs:
|
||||
# 构造详情vod,将歌曲作为“剧集”列表
|
||||
play_urls = []
|
||||
for song in songs:
|
||||
# 格式:歌曲名$播放地址
|
||||
play_urls.append(f"{song['vod_name']}${song['vod_play_url'].split('$')[1]}")
|
||||
vod = {
|
||||
"vod_id": vod_id,
|
||||
"vod_name": f"歌单{playlist_id}",
|
||||
"vod_pic": songs[0].get('vod_pic', ''),
|
||||
"vod_remarks": "",
|
||||
"vod_content": "",
|
||||
"vod_play_from": "DJ多多",
|
||||
"vod_play_url": "#".join(play_urls)
|
||||
}
|
||||
vod_list.append(vod)
|
||||
else:
|
||||
# 空歌单
|
||||
vod_list.append({
|
||||
"vod_id": vod_id,
|
||||
"vod_name": "空歌单",
|
||||
"vod_pic": "",
|
||||
"vod_remarks": "",
|
||||
"vod_content": "",
|
||||
"vod_play_from": "DJ多多",
|
||||
"vod_play_url": ""
|
||||
})
|
||||
|
||||
else:
|
||||
# 未知类型
|
||||
pass
|
||||
|
||||
return {'list': vod_list}
|
||||
|
||||
def searchContent(self, key, quick=False):
|
||||
"""搜索歌曲"""
|
||||
vod_list = []
|
||||
page = 0
|
||||
data = self.fetch_json("/v4/search.php?act=sch", {
|
||||
"Query": key,
|
||||
"From": "HotSearch",
|
||||
"Uid": 9447509,
|
||||
"PageNo": page
|
||||
})
|
||||
if data and 'List' in data:
|
||||
for item in data['List']:
|
||||
vod = self.parse_song_item(item)
|
||||
if vod and vod.get('vod_play_url'):
|
||||
vod_list.append(vod)
|
||||
return {'list': vod_list}
|
||||
|
||||
def playerContent(self, flag, id, vipFlags):
|
||||
"""播放器解析,直接返回真实地址"""
|
||||
return {"playUrl": id, "flag": flag}
|
||||
|
||||
# ---------- 辅助方法 ----------
|
||||
def localProxy(self, param):
|
||||
# 不需要本地代理
|
||||
return []
|
||||
@@ -0,0 +1,311 @@
|
||||
import requests
|
||||
import json
|
||||
import re
|
||||
import time
|
||||
import datetime
|
||||
from urllib.parse import quote, unquote
|
||||
from base.spider import Spider
|
||||
|
||||
class Spider(Spider):
|
||||
name = "西饭短剧"
|
||||
host = "https://xifan-api-cn.youlishipin.com"
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 8.0; DUK-AL20 Build/HUAWEIDUK-AL20; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/6.2 TBS/044353 Mobile Safari/537.36 MicroMessenger/6.7.3.1360(0x26070333) NetType/WIFI Language/zh_CN Process/tools'
|
||||
}
|
||||
self.session_params = "&session=eyJpbmZvIjp7InVpZCI6IiIsInJ0IjoiMTc0MDY1ODI5NCIsInVuIjoiT1BHXzFlZGQ5OTZhNjQ3ZTQ1MjU4Nzc1MTE2YzFkNzViN2QwIiwiZnQiOiIxNzQwNjU4Mjk0In19&feedssession=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1dHlwIjowLCJidWlkIjoxNjMzOTY4MTI2MTQ4NjQxNTM2LCJhdWQiOiJkcmFtYSIsInZlciI6MiwicmF0IjoxNzQwNjU4Mjk0LCJ1bm0iOiJPUEdfMWVkZDk5NmE2NDdlNDUyNTg3NzUxMTZjMWQ3NWI3ZDAiLCJpZCI6IjNiMzViZmYzYWE0OTgxNDQxNDBlZjI5N2JkMDY5NGNhIiwiZXhwIjoxNzQxMjYzMDk0LCJkYyI6Imd6cXkifQ.JS3QY6ER0P2cQSxAE_OGKSMIWNAMsYUZ3mJTnEpf-Rc"
|
||||
|
||||
def getName(self):
|
||||
return self.name
|
||||
|
||||
def init(self, extend):
|
||||
pass
|
||||
|
||||
def isVideoFormat(self, url):
|
||||
pass
|
||||
|
||||
def manualVideoCheck(self):
|
||||
pass
|
||||
|
||||
def homeContent(self, filter):
|
||||
return {
|
||||
"class": [
|
||||
{"type_id": "都市", "type_name": "都市"},
|
||||
{"type_id": "青春", "type_name": "青春"},
|
||||
{"type_id": "现代", "type_name": "现代"},
|
||||
{"type_id": "豪门", "type_name": "豪门"},
|
||||
{"type_id": "逆袭", "type_name": "逆袭"},
|
||||
{"type_id": "穿越", "type_name": "穿越"},
|
||||
{"type_id": "打脸", "type_name": "打脸"}
|
||||
]
|
||||
}
|
||||
|
||||
def homeVideoContent(self):
|
||||
videos = []
|
||||
current_timestamp = int(datetime.datetime.now().timestamp())
|
||||
|
||||
try:
|
||||
url = f"{self.host}/xifan/drama/portalPage?reqType=aggregationPage&offset=0&quickEngineVersion=-1&scene=&categoryNames=&categoryVersion=&density=1.5&pageID=page_theater&version=2001001&androidVersionCode=28&requestId={current_timestamp}d4aa487d53e646c2&appId=drama&teenMode=false&userBaseMode=false&session=eyJpbmZvIjp7InVpZCI6IiIsInJ0IjoiMTc0MDY0NjA2MiIsInVuIjoiT1BHXzYzZTYyMTdhZGJhMDQ4NGI5OWNmYTdkOWMyNmU2NTIwIiwiZnQiOiIxNzQwNjQ2MDYyIn19&feedssession=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1dHlwIjowLCJidWlkIjoxNjMzODY1NTEzMDAzNzYyNjg4LCJhdWQiOiJkrmFtYSIsInZlciI6MiwicmF0IjoxNzQwNjQ2MDYyLCJ1bm0iOiJPUEdfNjNlNjIxN2FkYmEwNDg0Yjk5Y2ZhN2Q5YzI2ZTY1MjAiLCJpZCI6Ijg4MmM2M2U3ZDRhYTQ4N2Q1M2U2NDZjMjQxMjg0NTcxIiwiZXhwIjoxNzQxMjUwODYyLCJkYyI6ImJqaHQifQ.zWhF-1Y92_NwuTzUQ_5dNoJwJN8g6UbMfVuH2QrSjjQ"
|
||||
response = requests.get(url=url, headers=self.headers)
|
||||
if response.status_code == 200:
|
||||
response_data = response.json()
|
||||
js = response_data['result']['elements']
|
||||
|
||||
for soups in js:
|
||||
for vod in soups['contents']:
|
||||
name = vod['duanjuVo']['title']
|
||||
id = vod['duanjuVo']['duanjuId']
|
||||
id1 = vod['duanjuVo']['source']
|
||||
pic = vod['duanjuVo']['coverImageUrl']
|
||||
total_episodes = vod['duanjuVo'].get('total', '')
|
||||
remark = f"{total_episodes}集" if total_episodes else ""
|
||||
|
||||
video = {
|
||||
"vod_id": id + "#" + id1,
|
||||
"vod_name": name,
|
||||
"vod_remarks": remark,
|
||||
"vod_pic": pic
|
||||
}
|
||||
videos.append(video)
|
||||
|
||||
result = {'list': videos}
|
||||
return result
|
||||
except Exception as e:
|
||||
print(f"获取首页推荐失败: {e}")
|
||||
return {'list': []}
|
||||
|
||||
def categoryContent(self, cid, pg, filter, ext):
|
||||
return self.getVideosByCategory(cid, pg)
|
||||
|
||||
def getVideosByCategory(self, cid, pg):
|
||||
result = {}
|
||||
videos = []
|
||||
|
||||
page = (int(pg) - 1) * 30
|
||||
current_timestamp = int(time.time())
|
||||
|
||||
# 使用URL编码后的分类名称
|
||||
encoded_cid = quote(cid)
|
||||
|
||||
if cid in ['都市', '青春', '现代']:
|
||||
category_id = "68"
|
||||
else:
|
||||
category_id = "67"
|
||||
|
||||
url = f"{self.host}/xifan/drama/portalPage?reqType=aggregationPage&offset={page}&categoryId={category_id}&quickEngineVersion=-1&scene=&categoryNames={encoded_cid}&categoryVersion=1&density=1.5&pageID=page_theater&version=2001001&androidVersionCode=28&requestId={current_timestamp}aa498144140ef297&appId=drama&teenMode=false&userBaseMode=false{self.session_params}"
|
||||
|
||||
try:
|
||||
response = requests.get(url=url, headers=self.headers, timeout=10)
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
elements = data.get('result', {}).get('elements', [])
|
||||
|
||||
for element in elements:
|
||||
contents = element.get('contents', [])
|
||||
for vod in contents:
|
||||
duanjuVo = vod.get('duanjuVo', {})
|
||||
if duanjuVo:
|
||||
video = {
|
||||
"vod_id": f"{duanjuVo.get('duanjuId', '')}#{duanjuVo.get('source', '')}",
|
||||
"vod_name": duanjuVo.get('title', ''),
|
||||
"vod_remarks": f"{duanjuVo.get('total', '')}集",
|
||||
"vod_pic": duanjuVo.get('coverImageUrl', '')
|
||||
}
|
||||
videos.append(video)
|
||||
except Exception as e:
|
||||
print(f"获取视频列表失败: {e}")
|
||||
|
||||
result['list'] = videos
|
||||
result['page'] = pg
|
||||
result['pagecount'] = 9999
|
||||
result['limit'] = 90
|
||||
result['total'] = 999999
|
||||
return result
|
||||
|
||||
def shouldUseAutoNumbering(self, episodeList, vod_name):
|
||||
if not episodeList:
|
||||
return False
|
||||
|
||||
valid_episode_count = 0
|
||||
for ep in episodeList:
|
||||
title = ep.get('title', '')
|
||||
|
||||
patterns = [
|
||||
r'第\s*\d+\s*集', r'第\s*\d+\s*章', r'第\s*\d+\s*话',
|
||||
r'\d+\s*集', r'\d+\s*章', r'\d+\s*话',
|
||||
r'EP\s*\d+', r'ep\s*\d+', r'Ep\s*\d+'
|
||||
]
|
||||
|
||||
has_episode_pattern = False
|
||||
for pattern in patterns:
|
||||
if re.search(pattern, title):
|
||||
has_episode_pattern = True
|
||||
break
|
||||
|
||||
if has_episode_pattern:
|
||||
valid_episode_count += 1
|
||||
|
||||
if valid_episode_count > len(episodeList) / 2:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def detailContent(self, ids):
|
||||
did = ids[0]
|
||||
result = {}
|
||||
videos = []
|
||||
|
||||
if '#' in did:
|
||||
duanjuId, source = did.split("#")
|
||||
else:
|
||||
duanjuId, source = did, ""
|
||||
|
||||
url = f"{self.host}/xifan/drama/getDuanjuInfo?duanjuId={duanjuId}&source={source}&openFrom=homescreen&type=&pageID=page_inner_flow&density=1.5&version=2001001&androidVersionCode=28&requestId=1740658944980aa498144140ef297&appId=drama&teenMode=false&userBaseMode=false{self.session_params}"
|
||||
|
||||
try:
|
||||
response = requests.get(url=url, headers=self.headers, timeout=10)
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
result_data = data.get('result', {})
|
||||
|
||||
playUrls = []
|
||||
episodeList = result_data.get('episodeList', [])
|
||||
|
||||
vod_name = result_data.get('title', '')
|
||||
|
||||
use_auto_numbering = self.shouldUseAutoNumbering(episodeList, vod_name)
|
||||
|
||||
for i, ep in enumerate(episodeList):
|
||||
original_title = ep.get('title', '')
|
||||
play_url = ep.get('playUrl', '')
|
||||
|
||||
if use_auto_numbering:
|
||||
episode_title = f"第{i+1}集"
|
||||
else:
|
||||
episode_title = self.extractEpisodeInfo(original_title, vod_name)
|
||||
|
||||
if not episode_title:
|
||||
episode_title = f"第{i+1}集"
|
||||
|
||||
playUrls.append(f"{episode_title}${play_url}")
|
||||
|
||||
vod_info = {
|
||||
"vod_id": did,
|
||||
"vod_name": vod_name,
|
||||
"vod_pic": result_data.get('coverImageUrl', ''),
|
||||
"vod_content": result_data.get('qualification', result_data.get('desc', '暂无简介')),
|
||||
"vod_remarks": f"{result_data.get('total', '')}集",
|
||||
"vod_play_from": "西饭短剧",
|
||||
"vod_play_url": "#".join(playUrls)
|
||||
}
|
||||
|
||||
videos.append(vod_info)
|
||||
except Exception as e:
|
||||
print(f"获取详情失败: {e}")
|
||||
|
||||
result['list'] = videos
|
||||
return result
|
||||
|
||||
def extractEpisodeInfo(self, title, vod_name):
|
||||
if title == vod_name:
|
||||
return None
|
||||
|
||||
patterns = [
|
||||
(r'第\s*(\d+)\s*集', '第{}集'),
|
||||
(r'第\s*(\d+)\s*章', '第{}章'),
|
||||
(r'第\s*(\d+)\s*话', '第{}话'),
|
||||
(r'(\d+)\s*集', '第{}集'),
|
||||
(r'(\d+)\s*章', '第{}章'),
|
||||
(r'(\d+)\s*话', '第{}话'),
|
||||
(r'EP\s*(\d+)', '第{}集'),
|
||||
(r'ep\s*(\d+)', '第{}集'),
|
||||
(r'Ep\s*(\d+)', '第{}集')
|
||||
]
|
||||
|
||||
for pattern, format_str in patterns:
|
||||
match = re.search(pattern, title)
|
||||
if match:
|
||||
number = match.group(1)
|
||||
return format_str.format(number)
|
||||
|
||||
if vod_name and title.startswith(vod_name):
|
||||
cleaned_title = title[len(vod_name):].strip()
|
||||
|
||||
separators = [':', ':', '-', '—', '——', ' ']
|
||||
for sep in separators:
|
||||
if cleaned_title.startswith(sep):
|
||||
cleaned_title = cleaned_title[len(sep):].strip()
|
||||
break
|
||||
|
||||
if cleaned_title:
|
||||
for pattern, format_str in patterns:
|
||||
match = re.search(pattern, cleaned_title)
|
||||
if match:
|
||||
number = match.group(1)
|
||||
return format_str.format(number)
|
||||
|
||||
return None
|
||||
|
||||
def playerContent(self, flag, id, vipFlags):
|
||||
result = {}
|
||||
result["parse"] = 0
|
||||
result["playUrl"] = ''
|
||||
result["url"] = id
|
||||
result["header"] = self.headers
|
||||
return result
|
||||
|
||||
def searchContent(self, key, quick, pg="1"):
|
||||
return self.searchContentPage(key, quick, pg)
|
||||
|
||||
def searchContentPage(self, key, quick, page):
|
||||
result = {}
|
||||
videos = []
|
||||
|
||||
current_timestamp = int(time.time())
|
||||
# 修复搜索URL:移除多余的"84",使用quote进行URL编码
|
||||
encoded_key = quote(key)
|
||||
url = f"{self.host}/xifan/search/getSearchList?keyword={encoded_key}&pageIndex={page}&version=2001001&androidVersionCode=28&requestId={current_timestamp}ea3a14bc0317d76f&appId=drama&teenMode=false&userBaseMode=false{self.session_params}"
|
||||
|
||||
try:
|
||||
response = requests.get(url=url, headers=self.headers, timeout=10)
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
elements = data.get('result', {}).get('elements', [])
|
||||
|
||||
for element in elements:
|
||||
contents = element.get('contents', [])
|
||||
for vod in contents:
|
||||
duanjuVo = vod.get('duanjuVo', {})
|
||||
if duanjuVo:
|
||||
# 移除标题中的HTML标签
|
||||
title = duanjuVo.get('title', '')
|
||||
if title and ('<' in title or '>' in title):
|
||||
title = re.sub(r'<[^>]+>', '', title)
|
||||
|
||||
video = {
|
||||
"vod_id": f"{duanjuVo.get('duanjuId', '')}#{duanjuVo.get('source', '')}",
|
||||
"vod_name": title,
|
||||
"vod_remarks": f"{duanjuVo.get('total', '')}集",
|
||||
"vod_pic": duanjuVo.get('coverImageUrl', '')
|
||||
}
|
||||
videos.append(video)
|
||||
except Exception as e:
|
||||
print(f"搜索失败: {e}")
|
||||
|
||||
result['list'] = videos
|
||||
result['page'] = page
|
||||
result['pagecount'] = 9999
|
||||
result['limit'] = 90
|
||||
result['total'] = 999999
|
||||
return result
|
||||
|
||||
def localProxy(self, params):
|
||||
if params['type'] == "m3u8":
|
||||
return self.proxyM3u8(params)
|
||||
elif params['type'] == "media":
|
||||
return self.proxyMedia(params)
|
||||
elif params['type'] == "ts":
|
||||
return self.proxyTs(params)
|
||||
return None
|
||||
@@ -0,0 +1,37 @@
|
||||
var rule = {
|
||||
类型:'影视',//影视|听书|漫画|小说
|
||||
title:'',
|
||||
host:'',
|
||||
url:'',
|
||||
searchUrl:'',
|
||||
searchable:2,
|
||||
quickSearch:0,
|
||||
filterable:0,
|
||||
headers:{
|
||||
'User-Agent':'MOBILE_UA',
|
||||
},
|
||||
timeout:5000,
|
||||
class_name:'*&*&*&*',
|
||||
class_url:'*&*&*&*',
|
||||
cate_exclude:'',
|
||||
play_parse:true,
|
||||
double:true,
|
||||
预处理:$js.toString(()=>{
|
||||
|
||||
}),
|
||||
推荐:$js.toString(()=>{
|
||||
|
||||
}),
|
||||
一级:$js.toString(()=>{
|
||||
|
||||
}),
|
||||
二级:$js.toString(()=>{
|
||||
|
||||
}),
|
||||
搜索:$js.toString(()=>{
|
||||
|
||||
}),
|
||||
lazy:$js.toString(()=>{
|
||||
|
||||
}),
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
//初版v2模板,自动分类筛选
|
||||
//填上这里host即可,其他不用改动
|
||||
|
||||
globalThis.gethost = '域名'
|
||||
|
||||
let data=JSON.parse(fetch(gethost+'/api.php/app/nav?token',{headers:{'User-Agent':'Dart/2.14 (dart:io)'}}));let dy={"class":"类型","area":"地区","lang":"语言","year":"年份","letter":"字母","by":"排序"};let fyurl='';let result={};let getn=[];let getu=[];let jsonData=data.list;for(let k=0;k<jsonData.length;k++){let hasNonEmptyField=false;getn.push(jsonData[k].type_name);getu.push(jsonData[k].type_id);for(let key in dy){if(key in jsonData[k].type_extend&&jsonData[k].type_extend[key].trim()!==""){hasNonEmptyField=true;break}};if(hasNonEmptyField){result[String(jsonData[k].type_id)]=[];for(let dkey in jsonData[k].type_extend){if(dkey in dy&&jsonData[k].type_extend[dkey].trim()!==""){if(k==0){fyurl+=`&${dkey}={{fl.${dkey}}}`}let values=jsonData[k].type_extend[dkey].split(',');let valueArray=values.map(value=>({"n":value.trim(),"v":value.trim()}));result[String(jsonData[k].type_id)].push({"key":dkey,"name":dy[dkey],"value":valueArray})}}}};globalThis.getname=getn.join("&");globalThis.geturl=getu.join("&");globalThis.getfilter=result;globalThis.getfyurl=fyurl;
|
||||
var rule = {
|
||||
author: '嗷呜',
|
||||
title: '[V2]模板',
|
||||
host: gethost,
|
||||
url: '/api.php/app/video?tid=fyclassfyfilter&limit=20&pg=fypage',
|
||||
filter_url: getfyurl,
|
||||
homeUrl: '/api.php/app/index_video',
|
||||
detailUrl: '/api.php/app/video_detail?id=fyid',
|
||||
searchUrl: '/api.php/app/search?text=**&pg=fypage',
|
||||
searchable: 2,
|
||||
quickSearch: 1,
|
||||
filterable: 1,
|
||||
headers: {
|
||||
'User-Agent': 'okhttp/4.9.1'
|
||||
},
|
||||
class_name: getname,
|
||||
class_url: geturl,
|
||||
filter: getfilter,
|
||||
limit: 20,
|
||||
play_parse: true,
|
||||
lazy: $js.toString(() => {
|
||||
let d = [];
|
||||
|
||||
try {
|
||||
// 发起请求并获取响应,添加请求头
|
||||
let headers = {
|
||||
'User-Agent': 'okhttp/4.12.0'
|
||||
};
|
||||
let responseText = request("http://154.9.253.211:777/api/?key=2YNgQfiAOfV6JLWSuF&url=" + input, { headers: headers });
|
||||
|
||||
console.log("响应文本:", responseText); // 查看原始响应内容
|
||||
//备用http://llyh.xn--yi7aa.top/api/?key=5b317c16d457b31a3150d87c0a362a9e&url=
|
||||
// 解析 JSON 数据
|
||||
let response = JSON.parse(responseText);
|
||||
|
||||
// 查找以 'url' 开头的字段
|
||||
let urlField = Object.keys(response).find(key => key.startsWith('url'));
|
||||
|
||||
// 提取找到的字段值
|
||||
let urlValue = urlField ? response[urlField] : null;
|
||||
|
||||
console.log("提取的随机字段值:", urlValue); // 查看提取的值
|
||||
|
||||
if (urlValue) {
|
||||
// 处理 urlValue,或将其用于 input
|
||||
input = {
|
||||
url: urlValue,
|
||||
parse: 0,
|
||||
header: rule.headers
|
||||
};
|
||||
} else {
|
||||
// 处理没有找到字段的情况
|
||||
console.error("没有找到以 'url' 开头的字段");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("处理请求或数据时发生错误:", error);
|
||||
}
|
||||
|
||||
setResult(d);
|
||||
}),
|
||||
推荐: $js.toString(() => {
|
||||
let data=JSON.parse(fetch(input)).list;let com=[];data.forEach(item=>{if(Array.isArray(item.vlist)&&item.vlist.length!==0){com=com.concat(item.vlist)}})
|
||||
VODS = com
|
||||
}),
|
||||
一级: $js.toString(() => {
|
||||
VODS = JSON.parse(fetch(input)).list
|
||||
}),
|
||||
二级: $js.toString(() => {
|
||||
VOD = JSON.parse(fetch(input)).data
|
||||
}),
|
||||
搜索: '*',
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
var rule = {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/vodshow/fyclass--------fypage---/',
|
||||
searchUrl: '/vodsearch/**----------fypage---/',
|
||||
class_parse: '.top_nav li;a&&Text;a&&href;.*/(.*?)/',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
play_parse: true,
|
||||
lazy: "js:\n let html = request(input);\n let hconf = html.match(/r player_.*?=(.*?)</)[1];\n let json = JSON5.parse(hconf);\n let url = json.url;\n if (json.encrypt == '1') {\n url = unescape(url);\n } else if (json.encrypt == '2') {\n url = unescape(base64Decode(url));\n }\n if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {\n input = {\n parse: 0,\n jx: 0,\n url: url,\n };\n } else {\n input;\n }",
|
||||
limit: 6,
|
||||
double: true,
|
||||
推荐: '.cbox_list;*;*;*;*;*',
|
||||
一级: 'ul.vodlist li;a&&title;a&&data-original;.pic_text&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h2&&Text;.content_detail:eq(1)&&li&&a:eq(2)&&Text',
|
||||
img: '.vodlist_thumb&&data-original',
|
||||
desc: '.content_detail:eq(1)&&li:eq(1)&&Text;.content_detail:eq(1)&&li&&a&&Text;.content_detail:eq(1)&&li&&a:eq(1)&&Text;.content_detail:eq(1)&&li:eq(2)&&Text;.content_detail:eq(1)&&li:eq(3)&&Text',
|
||||
content: '.content_desc&&span&&Text',
|
||||
tabs: '.play_source_tab&&a',
|
||||
lists: '.content_playlist:eq(#id) li',
|
||||
},
|
||||
搜索: '*',
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
var rule = {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/show/fyclass--------fypage---.html',
|
||||
searchUrl: '/search/**----------fypage---.html',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
class_parse: '.nav-menu-items&&li;a&&Text;a&&href;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: "js:\n let html = request(input);\n let hconf = html.match(/r player_.*?=(.*?)</)[1];\n let json = JSON5.parse(hconf);\n let url = json.url;\n if (json.encrypt == '1') {\n url = unescape(url);\n } else if (json.encrypt == '2') {\n url = unescape(base64Decode(url));\n }\n if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {\n input = {\n parse: 0,\n jx: 0,\n url: url,\n };\n } else {\n input;\n }",
|
||||
limit: 6,
|
||||
double: true,
|
||||
推荐: '.module-list;.module-items&&.module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
||||
一级: '.module-items .module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h1&&Text;.tag-link&&Text',
|
||||
img: '.module-item-pic&&img&&data-src',
|
||||
desc: '.video-info-items:eq(3)&&Text;.tag-link:eq(2)&&Text;.tag-link:eq(1)&&Text;.video-info-items:eq(1)&&Text;.video-info-items:eq(0)&&Text',
|
||||
content: '.vod_content&&Text',
|
||||
tabs: '.module-tab-item',
|
||||
lists: '.module-player-list:eq(#id)&&.scroll-content&&a',
|
||||
tab_text: 'div--small&&Text',
|
||||
},
|
||||
搜索: '.module-items .module-search-item;a&&title;img&&data-src;.video-serial&&Text;a&&href',
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
var rule = {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/vodshow/fyclass--------fypage---.html',
|
||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
class_parse: '.navbar-items li:gt(0):lt(10);a&&Text;a&&href;/(\\d+)',
|
||||
play_parse: true,
|
||||
lazy: "js:\n let html = request(input);\n let hconf = html.match(/r player_.*?=(.*?)</)[1];\n let json = JSON5.parse(hconf);\n let url = json.url;\n if (json.encrypt == '1') {\n url = unescape(url);\n } else if (json.encrypt == '2') {\n url = unescape(base64Decode(url));\n }\n if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {\n input = {\n parse: 0,\n jx: 0,\n url: url,\n };\n } else {\n input;\n }",
|
||||
limit: 6,
|
||||
double: true,
|
||||
推荐: '.tab-list.active;a.module-poster-item.module-item;.module-poster-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||
一级: 'body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h1&&Text;.module-info-tag-link:eq(-1)&&Text',
|
||||
img: '.lazyload&&data-original||data-src||src',
|
||||
desc: '.module-info-item:eq(-2)&&Text;.module-info-tag-link&&Text;.module-info-tag-link:eq(1)&&Text;.module-info-item:eq(2)&&Text;.module-info-item:eq(1)&&Text',
|
||||
content: '.module-info-introduction&&Text',
|
||||
tabs: '.module-tab-item',
|
||||
lists: '.module-play-list:eq(#id) a',
|
||||
tab_text: 'div--small&&Text',
|
||||
},
|
||||
搜索: 'body .module-item;.module-card-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href;.module-info-item-content&&Text',
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
var rule = {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/index.php/vod/show/id/fyclass/page/fypage.html',
|
||||
searchUrl: '/index.php/vod/search/page/fypage/wd/**.html',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'UC_UA',
|
||||
},
|
||||
class_parse: '.fed-pops-navbar&&ul.fed-part-rows&&a;a&&Text;a&&href;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: "js:\n let html = request(input);\n let hconf = html.match(/r player_.*?=(.*?)</)[1];\n let json = JSON5.parse(hconf);\n let url = json.url;\n if (json.encrypt == '1') {\n url = unescape(url);\n } else if (json.encrypt == '2') {\n url = unescape(base64Decode(url));\n }\n if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {\n input = {\n parse: 0,\n jx: 0,\n url: url,\n };\n } else {\n input;\n }",
|
||||
limit: 6,
|
||||
double: true,
|
||||
推荐: 'ul.fed-list-info.fed-part-rows;li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
||||
一级: '.fed-list-info&&li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h1.fed-part-eone&&Text;.fed-deta-content&&.fed-part-rows&&li&&Text',
|
||||
img: '.fed-list-info&&a&&data-original',
|
||||
desc: '.fed-deta-content&&.fed-part-rows&&li:eq(1)&&Text;.fed-deta-content&&.fed-part-rows&&li:eq(2)&&Text;.fed-deta-content&&.fed-part-rows&&li:eq(3)&&Text',
|
||||
content: '.fed-part-esan&&Text',
|
||||
tabs: '.fed-drop-boxs&&.fed-part-rows&&li',
|
||||
lists: '.fed-play-item:eq(#id)&&ul:eq(1)&&li',
|
||||
},
|
||||
搜索: '.fed-deta-info;h1&&Text;.lazyload&&data-original;.fed-list-remarks&&Text;a&&href;.fed-deta-content&&Text',
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
var rule = {
|
||||
类型:'影视',//影视|听书|漫画|小说
|
||||
title:'',
|
||||
host:'',
|
||||
url:'',
|
||||
searchUrl:'',
|
||||
searchable:2,
|
||||
quickSearch:0,
|
||||
filterable:1,
|
||||
filter:'',
|
||||
filter_url:'',
|
||||
filter_def:{},
|
||||
headers:{
|
||||
'User-Agent':'MOBILE_UA',
|
||||
},
|
||||
timeout:5000,
|
||||
class_parse:'#side-menu li;a&&Text;a&&href;/(.*?)\.html',
|
||||
cate_exclude:'',
|
||||
//class_name:'电影&电视剧&动漫&综艺',
|
||||
//class_url:'1&2&3&4',
|
||||
play_parse:true,
|
||||
lazy:$js.toString(()=>{
|
||||
input = {parse:1,url:input,js:''};
|
||||
}),
|
||||
double:true,
|
||||
推荐:'列表1;列表2;标题;图片;描述;链接;详情',
|
||||
一级:'列表;标题;图片;描述;链接;详情',
|
||||
二级:{
|
||||
title:'vod_name;vod_type',
|
||||
img:'图片链接',
|
||||
desc:'主要信息;年代;地区;演员;导演',
|
||||
content:'简介',
|
||||
tabs:'',
|
||||
lists:'xx:eq(#id)&&a',
|
||||
tab_text:'body&&Text',
|
||||
list_text:'body&&Text',
|
||||
list_url:'a&&href',
|
||||
list_url_prefix: '',
|
||||
},
|
||||
搜索:'列表;标题;图片;描述;链接;详情',
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
var rule = {
|
||||
类型:'影视',//影视|听书|漫画|小说
|
||||
title:'',
|
||||
host:'',
|
||||
url:'',
|
||||
searchUrl:'',
|
||||
searchable:2,
|
||||
quickSearch:0,
|
||||
filterable:1,
|
||||
filter:'',
|
||||
filter_url:'',
|
||||
headers:{
|
||||
'User-Agent':'MOBILE_UA',
|
||||
},
|
||||
timeout:5000,
|
||||
class_parse:'#side-menu li;a&&Text;a&&href;/(.*?)\.html',
|
||||
cate_exclude:'',
|
||||
play_parse:true,
|
||||
double:true,
|
||||
推荐:$js.toString(()=>{
|
||||
let html=request(input);
|
||||
let data=pdfa(html,'');
|
||||
VODS = [];
|
||||
}),
|
||||
一级:$js.toString(()=>{
|
||||
let html=request(input);
|
||||
let data=pdfa(html,'');
|
||||
VODS = [];
|
||||
}),
|
||||
二级:$js.toString(()=>{
|
||||
let html=request(input);
|
||||
let vod_name=pdfh(html,'.title&&Text');
|
||||
VOD = {vod_name:vod_name};
|
||||
}),
|
||||
搜索:$js.toString(()=>{
|
||||
let html=request(input);
|
||||
let data=pdfa(html,'');
|
||||
VODS = [];
|
||||
}),
|
||||
lazy:$js.toString(()=>{
|
||||
input = {parse:0,url:input,js:''};
|
||||
}),
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
var rule = {
|
||||
类型:'影视',//影视|听书|漫画|小说
|
||||
title:'规则标题',
|
||||
编码:'utf-8',
|
||||
搜索编码:'utf-8',
|
||||
host:'网页的域名根',
|
||||
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","")',
|
||||
homeUrl:'/latest/',
|
||||
url:'/fyclass/fypage.html[/fyclass/]',
|
||||
detailUrl:'https://yanetflix.com/voddetail/fyid.html',
|
||||
searchUrl:'',
|
||||
searchable:2,
|
||||
quickSearch:0,
|
||||
filterable:1,
|
||||
filter:{},
|
||||
filter_def:{
|
||||
1:{
|
||||
年份:'2024',
|
||||
},
|
||||
},
|
||||
filter_url:'style={{fl.style}}&zone={{fl.zone}}&year={{fl.year}}&fee={{fl.fee}}&order={{fl.order}}',
|
||||
headers:{
|
||||
'User-Agent':'MOBILE_UA',
|
||||
"Cookie": "searchneed=ok"
|
||||
},
|
||||
timeout:5000,
|
||||
class_name:'电影&电视剧&动漫&综艺',
|
||||
class_url:'1&2&3&4',
|
||||
class_parse:'#side-menu:lt(1) li;a&&Text;a&&href;com/(.*?)/',
|
||||
cate_exclude:'',
|
||||
tab_exclude:'',
|
||||
tab_remove:['tkm3u8'],
|
||||
tab_order:['lzm3u8','wjm3u8','1080zyk','zuidam3u8','snm3u8'],
|
||||
tab_rename:{'lzm3u8':'量子','1080zyk':'1080看','zuidam3u8':'最大资源','kuaikan':'快看',
|
||||
'bfzym3u8':'暴风','ffm3u8':'非凡','snm3u8':'索尼','tpm3u8':'淘片','tkm3u8':'天空',},
|
||||
play_parse:true,
|
||||
play_json:[{
|
||||
re:'*',
|
||||
json:{
|
||||
jx:1,
|
||||
parse:1,
|
||||
},
|
||||
}],
|
||||
pagecount:{"1":1,"2":1,"3":1,"4":1,"5":1,"7":1,"时间表":1},
|
||||
lazy:'',
|
||||
limit:6,
|
||||
double:true,
|
||||
图片来源:'@Referer=http://www.jianpianapp.com@User-Agent=jianpian-version350',
|
||||
图片替换:'https://www.keke6.app/=>https://vres.a357899.cn/',
|
||||
预处理:'rule_fetch_params.headers.Cookie = "xxxx";',
|
||||
推荐:'列表;标题;图片;描述;链接;详情',
|
||||
一级:'列表;标题;图片;描述;链接;详情',
|
||||
二级访问前:'log(MY_URL);let jump=request(MY_URL).match(/href="(.*?)"/)[1];log(jump);MY_URL=urljoin2(MY_URL,jump)',
|
||||
二级:{
|
||||
title:'vod_name;vod_type',
|
||||
img:'图片链接',
|
||||
desc:'主要信息;年代;地区;演员;导演',
|
||||
content:'简介',
|
||||
tabs:'',
|
||||
lists:'',
|
||||
tab_text:'body&&Text',
|
||||
list_text:'body&&Text',
|
||||
list_url:'a&&href',
|
||||
list_url_prefix: '',
|
||||
},
|
||||
搜索:'列表;标题;图片;描述;链接;详情',
|
||||
proxy_rule:`js:
|
||||
log(input);
|
||||
input = [200,'text;plain','hello drpy']
|
||||
`,
|
||||
sniffer:1,
|
||||
isVideo:"http((?!http).){26,}\.(m3u8|mp4|flv|avi|mkv|wmv|mpg|mpeg|mov|ts|3gp|rm|rmvb|asf|m4a|mp3|wma)",
|
||||
isVideo:`js:
|
||||
log(input);
|
||||
if(/m3u8/.test(input)){
|
||||
input = true
|
||||
}else{
|
||||
input = false
|
||||
}
|
||||
`,
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
var rule = {
|
||||
类型:'影视',//影视|听书|漫画|小说
|
||||
title:'',
|
||||
host:'',
|
||||
url:'',
|
||||
searchUrl:'',
|
||||
searchable:2,
|
||||
quickSearch:0,
|
||||
filterable:1,
|
||||
filter:'',
|
||||
filter_url:'',
|
||||
headers:{
|
||||
'User-Agent':'MOBILE_UA',
|
||||
},
|
||||
timeout:5000,
|
||||
class_name:'*&*&*&*',
|
||||
class_url:'*&*&*&*',
|
||||
cate_exclude:'',
|
||||
play_parse:true,
|
||||
double:true,
|
||||
推荐:$js.toString(()=>{
|
||||
let html=request(input);
|
||||
let data=pdfa(html,'');
|
||||
VODS = [];
|
||||
}),
|
||||
一级:$js.toString(()=>{
|
||||
let html=request(input);
|
||||
let data=pdfa(html,'');
|
||||
VODS = [];
|
||||
}),
|
||||
二级:$js.toString(()=>{
|
||||
let html=request(input);
|
||||
let vod_name=pdfh(html,'.title&&Text');
|
||||
VOD = {vod_name:vod_name};
|
||||
}),
|
||||
搜索:$js.toString(()=>{
|
||||
let html=request(input);
|
||||
let data=pdfa(html,'');
|
||||
VODS = [];
|
||||
}),
|
||||
lazy:$js.toString(()=>{
|
||||
input = {parse:0,url:input,js:''};
|
||||
}),
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
var rule = {
|
||||
类型:'影视',//影视|听书|漫画|小说
|
||||
title:'',
|
||||
host:'',
|
||||
url:'',
|
||||
searchUrl:'',
|
||||
searchable:2,
|
||||
quickSearch:0,
|
||||
filterable:1,
|
||||
filter:'',
|
||||
filter_url:'',
|
||||
headers:{
|
||||
'User-Agent':'MOBILE_UA',
|
||||
},
|
||||
timeout:5000,
|
||||
class_parse: $js.toString(() => {
|
||||
let classes = [
|
||||
{ type_id: *, type_name: '*' },
|
||||
{ type_id: *, type_name: '*' },
|
||||
{ type_id: *, type_name: '*' },
|
||||
{ type_id: *, type_name: '*' },
|
||||
{ type_id: *, type_name: '*' },
|
||||
{ type_id: *, type_name: '*' },
|
||||
{ type_id: *, type_name: '*' }
|
||||
];
|
||||
input = classes;
|
||||
}),
|
||||
cate_exclude:'',
|
||||
play_parse:true,
|
||||
double:true,
|
||||
推荐:$js.toString(()=>{
|
||||
let html=request(input);
|
||||
let data=pdfa(html,'');
|
||||
VODS = [];
|
||||
}),
|
||||
一级:$js.toString(()=>{
|
||||
let html=request(input);
|
||||
let data=pdfa(html,'');
|
||||
VODS = [];
|
||||
}),
|
||||
二级:$js.toString(()=>{
|
||||
let html=request(input);
|
||||
let vod_name=pdfh(html,'.title&&Text');
|
||||
VOD = {vod_name:vod_name};
|
||||
}),
|
||||
搜索:$js.toString(()=>{
|
||||
let html=request(input);
|
||||
let data=pdfa(html,'');
|
||||
VODS = [];
|
||||
}),
|
||||
lazy:$js.toString(()=>{
|
||||
input = {parse:0,url:input,js:''};
|
||||
}),
|
||||
}
|
||||
@@ -0,0 +1,412 @@
|
||||
if (typeof Object.assign !== 'function') {
|
||||
Object.assign = function () {
|
||||
let target = arguments[0];
|
||||
for (let i = 1; i < arguments.length; i++) {
|
||||
let source = arguments[i];
|
||||
for (let key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
}
|
||||
|
||||
// 通用免嗅探播放
|
||||
let common_lazy = `js:
|
||||
let html = request(input);
|
||||
let hconf = html.match(/r player_.*?=(.*?)</)[1];
|
||||
let json = JSON5.parse(hconf);
|
||||
let url = json.url;
|
||||
if (json.encrypt == '1') {
|
||||
url = unescape(url);
|
||||
} else if (json.encrypt == '2') {
|
||||
url = unescape(base64Decode(url));
|
||||
}
|
||||
if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {
|
||||
input = {
|
||||
parse: 0,
|
||||
jx: 0,
|
||||
url: url,
|
||||
};
|
||||
} else {
|
||||
input = url && url.startsWith('http') && tellIsJx(url) ? {parse:0,jx:1,url:url}:input;
|
||||
}`;
|
||||
// 默认嗅探播放
|
||||
|
||||
let def_lazy = `js:
|
||||
input = { parse: 1, url: input, js: '' };`;
|
||||
// 采集站播放
|
||||
|
||||
let cj_lazy = `js:
|
||||
if (/\\.(m3u8|mp4)/.test(input)) {
|
||||
input = { parse: 0, url: input };
|
||||
} else {
|
||||
if (rule.parse_url.startsWith('json:')) {
|
||||
let purl = rule.parse_url.replace('json:', '') + input;
|
||||
let html = request(purl);
|
||||
let json = JSON.parse(html);
|
||||
if (json.url) {
|
||||
input = { parse: 0, url: json.url };
|
||||
}
|
||||
} else {
|
||||
input = rule.parse_url + input;
|
||||
}
|
||||
}`;
|
||||
|
||||
function getMubans() {
|
||||
const mubanDict = { // 模板字典
|
||||
mx: {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/vodshow/fyclass--------fypage---/',
|
||||
searchUrl: '/vodsearch/**----------fypage---/',
|
||||
class_parse: '.top_nav li;a&&Text;a&&href;.*/(.*?)/',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true,
|
||||
推荐: '.cbox_list;*;*;*;*;*',
|
||||
一级: 'ul.vodlist li;a&&title;a&&data-original;.pic_text&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h2&&Text;.content_detail:eq(1)&&li&&a:eq(2)&&Text',
|
||||
img: '.vodlist_thumb&&data-original',
|
||||
desc: '.content_detail:eq(1)&&li:eq(1)&&Text;.content_detail:eq(1)&&li&&a&&Text;.content_detail:eq(1)&&li&&a:eq(1)&&Text;.content_detail:eq(1)&&li:eq(2)&&Text;.content_detail:eq(1)&&li:eq(3)&&Text',
|
||||
content: '.content_desc&&span&&Text',
|
||||
tabs: '.play_source_tab&&a',
|
||||
lists: '.content_playlist:eq(#id) li',
|
||||
},
|
||||
搜索: '*',
|
||||
},
|
||||
mxpro: {
|
||||
title: '',
|
||||
host: '', // homeUrl:'/',
|
||||
url: '/vodshow/fyclass--------fypage---.html',
|
||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||
searchable: 2,//是否启用全局搜索,
|
||||
quickSearch: 0,//是否启用快速搜索,
|
||||
filterable: 0,//是否启用分类筛选,
|
||||
headers: {//网站的请求头,完整支持所有的,常带ua和cookies
|
||||
'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
|
||||
},
|
||||
class_parse: '.navbar-items li:gt(0):lt(10);a&&Text;a&&href;/(\\d+)',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.tab-list.active;a.module-poster-item.module-item;.module-poster-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||
一级: 'body a.module-poster-item.module-item;a&&title;.lazyload&&data-original;.module-item-note&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h1&&Text;.module-info-tag-link:eq(-1)&&Text',
|
||||
img: '.lazyload&&data-original||data-src||src',
|
||||
desc: '.module-info-item:eq(-2)&&Text;.module-info-tag-link&&Text;.module-info-tag-link:eq(1)&&Text;.module-info-item:eq(2)&&Text;.module-info-item:eq(1)&&Text',
|
||||
content: '.module-info-introduction&&Text',
|
||||
tabs: '.module-tab-item',
|
||||
lists: '.module-play-list:eq(#id) a',
|
||||
tab_text: 'div--small&&Text',
|
||||
},
|
||||
搜索: 'body .module-item;.module-card-item-title&&Text;.lazyload&&data-original;.module-item-note&&Text;a&&href;.module-info-item-content&&Text',
|
||||
}, mxone5: {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/show/fyclass--------fypage---.html',
|
||||
searchUrl: '/search/**----------fypage---.html',
|
||||
searchable: 2,//是否启用全局搜索,
|
||||
quickSearch: 0,//是否启用快速搜索,
|
||||
filterable: 0,//是否启用分类筛选,
|
||||
class_parse: '.nav-menu-items&&li;a&&Text;a&&href;.*/(.*?)\.html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.module-list;.module-items&&.module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
||||
一级: '.module-items .module-item;a&&title;img&&data-src;.module-item-text&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h1&&Text;.tag-link&&Text',
|
||||
img: '.module-item-pic&&img&&data-src',
|
||||
desc: '.video-info-items:eq(3)&&Text;.tag-link:eq(2)&&Text;.tag-link:eq(1)&&Text;.video-info-items:eq(1)&&Text;.video-info-items:eq(0)&&Text',
|
||||
content: '.vod_content&&Text',
|
||||
tabs: '.module-tab-item',
|
||||
lists: '.module-player-list:eq(#id)&&.scroll-content&&a',
|
||||
tab_text: 'div--small&&Text',
|
||||
},
|
||||
搜索: '.module-items .module-search-item;a&&title;img&&data-src;.video-serial&&Text;a&&href',
|
||||
}, 首图: {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/vodshow/fyclass--------fypage---/',
|
||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||
searchable: 2,//是否启用全局搜索,
|
||||
quickSearch: 0,//是否启用快速搜索,
|
||||
filterable: 0,//是否启用分类筛选,
|
||||
headers: {//网站的请求头,完整支持所有的,常带ua和cookies
|
||||
'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
|
||||
},
|
||||
class_parse: '.myui-header__menu li.hidden-sm:gt(0):lt(7);a&&Text;a&&href;/(\\d+).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.myui-vodlist.clearfix;li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
一级: '.myui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
二级: {
|
||||
title: '.myui-content__detail .title--span&&Text;.myui-content__detail p.data:eq(3)&&Text',
|
||||
img: '.myui-content__thumb .lazyload&&data-original',
|
||||
desc: '.myui-content__detail p.otherbox&&Text;.year&&Text;.myui-content__detail p.data:eq(4)&&Text;.myui-content__detail p.data:eq(2)&&Text;.myui-content__detail p.data:eq(0)&&Text',
|
||||
content: '.content&&Text',
|
||||
tabs: '.myui-panel__head&&li',
|
||||
// tabs: '.nav-tabs&&li',
|
||||
lists: '.myui-content__list:eq(#id) li',
|
||||
},
|
||||
搜索: '#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&Text',
|
||||
}, 首图2: {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/list/fyclass-fypage.html',
|
||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||
searchable: 2,//是否启用全局搜索,
|
||||
quickSearch: 0,//是否启用快速搜索,
|
||||
filterable: 0,//是否启用分类筛选,
|
||||
headers: {
|
||||
'User-Agent': 'UC_UA', // "Cookie": ""
|
||||
},
|
||||
class_parse: '.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
|
||||
一级: '.stui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
二级: {
|
||||
title: '.stui-content__detail .title&&Text;.stui-content__detail&&p:eq(-2)&&a&&Text',
|
||||
title1: '.stui-content__detail .title&&Text;.stui-content__detail&&p&&Text',
|
||||
img: '.stui-content__thumb .lazyload&&data-original',
|
||||
desc: '.stui-content__detail p&&Text;.stui-content__detail&&p:eq(-2)&&a:eq(2)&&Text;.stui-content__detail&&p:eq(-2)&&a:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text;.stui-content__detail p:eq(1)&&Text',
|
||||
desc1: '.stui-content__detail p:eq(4)&&Text;;;.stui-content__detail p:eq(1)&&Text',
|
||||
content: '.detail&&Text',
|
||||
tabs: '.stui-pannel__head h3',
|
||||
tabs1: '.stui-vodlist__head h3',
|
||||
lists: '.stui-content__playlist:eq(#id) li',
|
||||
},
|
||||
搜索: 'ul.stui-vodlist__media,ul.stui-vodlist,#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&Text',
|
||||
}, 默认: {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '',
|
||||
searchUrl: '',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
filter: '',
|
||||
filter_url: '',
|
||||
filter_def: {},
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
timeout: 5000,
|
||||
class_parse: '#side-menu li;a&&Text;a&&href;/(.*?)\.html',
|
||||
cate_exclude: '',
|
||||
play_parse: true,
|
||||
lazy: def_lazy,
|
||||
double: true,
|
||||
推荐: '列表1;列表2;标题;图片;描述;链接;详情',
|
||||
一级: '列表;标题;图片;描述;链接;详情',
|
||||
二级: {
|
||||
title: 'vod_name;vod_type',
|
||||
img: '图片链接',
|
||||
desc: '主要信息;年代;地区;演员;导演',
|
||||
content: '简介',
|
||||
tabs: '',
|
||||
lists: 'xx:eq(#id)&&a',
|
||||
tab_text: 'body&&Text',
|
||||
list_text: 'body&&Text',
|
||||
list_url: 'a&&href',
|
||||
},
|
||||
搜索: '列表;标题;图片;描述;链接;详情',
|
||||
}, vfed: {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/index.php/vod/show/id/fyclass/page/fypage.html',
|
||||
searchUrl: '/index.php/vod/search/page/fypage/wd/**.html',
|
||||
searchable: 2,//是否启用全局搜索,
|
||||
quickSearch: 0,//是否启用快速搜索,
|
||||
filterable: 0,//是否启用分类筛选,
|
||||
headers: {
|
||||
'User-Agent': 'UC_UA',
|
||||
},
|
||||
class_parse: '.fed-pops-navbar&&ul.fed-part-rows&&a;a&&Text;a&&href;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: 'ul.fed-list-info.fed-part-rows;li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
||||
一级: '.fed-list-info&&li;a.fed-list-title&&Text;a&&data-original;.fed-list-remarks&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h1.fed-part-eone&&Text;.fed-deta-content&&.fed-part-rows&&li&&Text',
|
||||
img: '.fed-list-info&&a&&data-original',
|
||||
desc: '.fed-deta-content&&.fed-part-rows&&li:eq(1)&&Text;.fed-deta-content&&.fed-part-rows&&li:eq(2)&&Text;.fed-deta-content&&.fed-part-rows&&li:eq(3)&&Text',
|
||||
content: '.fed-part-esan&&Text',
|
||||
tabs: '.fed-drop-boxs&&.fed-part-rows&&li',
|
||||
lists: '.fed-play-item:eq(#id)&&ul:eq(1)&&li',
|
||||
},
|
||||
搜索: '.fed-deta-info;h1&&Text;.lazyload&&data-original;.fed-list-remarks&&Text;a&&href;.fed-deta-content&&Text',
|
||||
}, 海螺3: {
|
||||
title: '',
|
||||
host: '',
|
||||
searchUrl: '/v_search/**----------fypage---.html',
|
||||
url: '/vod_____show/fyclass--------fypage---.html',
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
timeout: 5000,
|
||||
class_parse: 'body&&.hl-nav li:gt(0);a&&Text;a&&href;.*/(.*?).html',
|
||||
cate_exclude: '明星|专题|最新|排行',
|
||||
limit: 40,
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
double: true,
|
||||
推荐: '.hl-vod-list;li;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||
一级: '.hl-vod-list&&.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||
二级: {
|
||||
title: '.hl-dc-title&&Text;.hl-dc-content&&li:eq(6)&&Text',
|
||||
img: '.hl-lazy&&data-original',
|
||||
desc: '.hl-dc-content&&li:eq(10)&&Text;.hl-dc-content&&li:eq(4)&&Text;.hl-dc-content&&li:eq(5)&&Text;.hl-dc-content&&li:eq(2)&&Text;.hl-dc-content&&li:eq(3)&&Text',
|
||||
content: '.hl-content-text&&Text',
|
||||
tabs: '.hl-tabs&&a',
|
||||
tab_text: 'a--span&&Text',
|
||||
lists: '.hl-plays-list:eq(#id)&&li',
|
||||
},
|
||||
搜索: '.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||
searchable: 2,//是否启用全局搜索,
|
||||
quickSearch: 0,//是否启用快速搜索,
|
||||
filterable: 0,//是否启用分类筛选,
|
||||
}, 海螺2: {
|
||||
title: '',
|
||||
host: '',
|
||||
searchUrl: '/index.php/vod/search/page/fypage/wd/**/',
|
||||
url: '/index.php/vod/show/id/fyclass/page/fypage/',
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
timeout: 5000,
|
||||
class_parse: '#nav-bar li;a&&Text;a&&href;id/(.*?)/',
|
||||
limit: 40,
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
double: true,
|
||||
推荐: '.list-a.size;li;a&&title;.lazy&&data-original;.bt&&Text;a&&href',
|
||||
一级: '.list-a&&li;a&&title;.lazy&&data-original;.list-remarks&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h2&&Text;.deployment&&Text',
|
||||
img: '.lazy&&data-original',
|
||||
desc: '.deployment&&Text',
|
||||
content: '.ec-show&&Text',
|
||||
tabs: '#tag&&a',
|
||||
lists: '.play_list_box:eq(#id)&&li',
|
||||
},
|
||||
搜索: '.search-list;a&&title;.lazy&&data-original;.deployment&&Text;a&&href',
|
||||
searchable: 2,//是否启用全局搜索,
|
||||
quickSearch: 0,//是否启用快速搜索,
|
||||
filterable: 0,//是否启用分类筛选,
|
||||
}, 短视: {
|
||||
title: '',
|
||||
host: '', // homeUrl:'/',
|
||||
url: '/channel/fyclass-fypage.html',
|
||||
searchUrl: '/search.html?wd=**',
|
||||
searchable: 2,//是否启用全局搜索,
|
||||
quickSearch: 0,//是否启用快速搜索,
|
||||
filterable: 0,//是否启用分类筛选,
|
||||
headers: {//网站的请求头,完整支持所有的,常带ua和cookies
|
||||
'User-Agent': 'MOBILE_UA', // "Cookie": "searchneed=ok"
|
||||
},
|
||||
class_parse: '.menu_bottom ul li;a&&Text;a&&href;.*/(.*?).html',
|
||||
cate_exclude: '解析|动态',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
double: true, // 推荐内容是否双层定位
|
||||
推荐: '.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
||||
一级: '.pic-list&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h1&&Text;.content-rt&&p:eq(0)&&Text',
|
||||
img: '.img&&img&&data-src',
|
||||
desc: '.content-rt&&p:eq(1)&&Text;.content-rt&&p:eq(2)&&Text;.content-rt&&p:eq(3)&&Text;.content-rt&&p:eq(4)&&Text;.content-rt&&p:eq(5)&&Text',
|
||||
content: '.zkjj_a&&Text',
|
||||
tabs: '.py-tabs&&option',
|
||||
lists: '.player:eq(#id) li',
|
||||
},
|
||||
搜索: '.sr_lists&&ul&&li;h3&&Text;img&&data-src;.int&&p:eq(0)&&Text;a&&href',
|
||||
}, 短视2: {
|
||||
title: '',
|
||||
host: '',
|
||||
class_name: '电影&电视剧&综艺&动漫',
|
||||
class_url: '1&2&3&4',
|
||||
searchUrl: '/index.php/ajax/suggest?mid=1&wd=**&limit=50',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
headers: {'User-Agent': 'MOBILE_UA'},
|
||||
url: '/index.php/api/vod#type=fyclass&page=fypage',
|
||||
filterable: 0,//是否启用分类筛选,
|
||||
filter_url: '',
|
||||
filter: {},
|
||||
filter_def: {},
|
||||
detailUrl: '/index.php/vod/detail/id/fyid.html',
|
||||
play_parse: true,
|
||||
lazy: common_lazy,
|
||||
limit: 6,
|
||||
推荐: '.list-vod.flex .public-list-box;a&&title;.lazy&&data-original;.public-list-prb&&Text;a&&href',
|
||||
一级: 'js:let body=input.split("#")[1];let t=Math.round(new Date/1e3).toString();let key=md5("DS"+t+"DCC147D11943AF75");let url=input.split("#")[0];body=body+"&time="+t+"&key="+key;print(body);fetch_params.body=body;let html=post(url,fetch_params);let data=JSON.parse(html);VODS=data.list.map(function(it){it.vod_pic=urljoin2(input.split("/i")[0],it.vod_pic);return it});',
|
||||
二级: {
|
||||
title: '.slide-info-title&&Text;.slide-info:eq(2)--strong&&Text',
|
||||
img: '.detail-pic&&data-original',
|
||||
desc: '.slide-info-remarks&&Text;.slide-info-remarks:eq(1)&&Text;.slide-info-remarks:eq(2)&&Text;.slide-info:eq(1)--strong&&Text;.info-parameter&&ul&&li:eq(3)&&Text',
|
||||
content: '#height_limit&&Text',
|
||||
tabs: '.anthology.wow.fadeInUp.animated&&.swiper-wrapper&&a',
|
||||
tab_text: 'a--span&&Text',
|
||||
lists: '.anthology-list-box:eq(#id) li',
|
||||
},
|
||||
搜索: 'json:list;name;pic;;id',
|
||||
}, 采集1: {
|
||||
title: '',
|
||||
host: '',
|
||||
homeTid: '13',
|
||||
homeUrl: '/api.php/provide/vod/?ac=detail&t={{rule.homeTid}}',
|
||||
detailUrl: '/api.php/provide/vod/?ac=detail&ids=fyid',
|
||||
searchUrl: '/api.php/provide/vod/?wd=**&pg=fypage',
|
||||
url: '/api.php/provide/vod/?ac=detail&pg=fypage&t=fyclass',
|
||||
headers: {'User-Agent': 'MOBILE_UA'},
|
||||
timeout: 5000, // class_name: '电影&电视剧&综艺&动漫',
|
||||
// class_url: '1&2&3&4',
|
||||
// class_parse:'js:let html=request(input);input=JSON.parse(html).class;',
|
||||
class_parse: 'json:class;',
|
||||
limit: 20,
|
||||
multi: 1,
|
||||
searchable: 2,//是否启用全局搜索,
|
||||
quickSearch: 1,//是否启用快速搜索,
|
||||
filterable: 0,//是否启用分类筛选,
|
||||
play_parse: true,
|
||||
parse_url: '',
|
||||
lazy: cj_lazy,
|
||||
推荐: '*',
|
||||
一级: 'json:list;vod_name;vod_pic;vod_remarks;vod_id;vod_play_from',
|
||||
二级: `js:
|
||||
let html=request(input);
|
||||
html=JSON.parse(html);
|
||||
let data=html.list;
|
||||
VOD=data[0];`,
|
||||
搜索: '*',
|
||||
},
|
||||
};
|
||||
return JSON.parse(JSON.stringify(mubanDict));
|
||||
}
|
||||
|
||||
var mubanDict = getMubans();
|
||||
var muban = getMubans();
|
||||
export default {muban, getMubans};
|
||||
@@ -0,0 +1,29 @@
|
||||
var rule = {
|
||||
title: '',
|
||||
host: '',
|
||||
searchUrl: '/index.php/vod/search/page/fypage/wd/**/',
|
||||
url: '/index.php/vod/show/id/fyclass/page/fypage/',
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
timeout: 5000,
|
||||
class_parse: '#nav-bar li;a&&Text;a&&href;id/(.*?)/',
|
||||
limit: 40,
|
||||
play_parse: true,
|
||||
lazy: "js:\n let html = request(input);\n let hconf = html.match(/r player_.*?=(.*?)</)[1];\n let json = JSON5.parse(hconf);\n let url = json.url;\n if (json.encrypt == '1') {\n url = unescape(url);\n } else if (json.encrypt == '2') {\n url = unescape(base64Decode(url));\n }\n if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {\n input = {\n parse: 0,\n jx: 0,\n url: url,\n };\n } else {\n input;\n }",
|
||||
double: true,
|
||||
推荐: '.list-a.size;li;a&&title;.lazy&&data-original;.bt&&Text;a&&href',
|
||||
一级: '.list-a&&li;a&&title;.lazy&&data-original;.list-remarks&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h2&&Text;.deployment&&Text',
|
||||
img: '.lazy&&data-original',
|
||||
desc: '.deployment&&Text',
|
||||
content: '.ec-show&&Text',
|
||||
tabs: '#tag&&a',
|
||||
lists: '.play_list_box:eq(#id)&&li',
|
||||
},
|
||||
搜索: '.search-list;a&&title;.lazy&&data-original;.deployment&&Text;a&&href',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
var rule = {
|
||||
title: '',
|
||||
host: '',
|
||||
searchUrl: '/v_search/**----------fypage---.html',
|
||||
url: '/vod_____show/fyclass--------fypage---.html',
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
timeout: 5000,
|
||||
class_parse: 'body&&.hl-nav li:gt(0);a&&Text;a&&href;.*/(.*?).html',
|
||||
cate_exclude: '明星|专题|最新|排行',
|
||||
limit: 40,
|
||||
play_parse: true,
|
||||
lazy: "js:\n let html = request(input);\n let hconf = html.match(/r player_.*?=(.*?)</)[1];\n let json = JSON5.parse(hconf);\n let url = json.url;\n if (json.encrypt == '1') {\n url = unescape(url);\n } else if (json.encrypt == '2') {\n url = unescape(base64Decode(url));\n }\n if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {\n input = {\n parse: 0,\n jx: 0,\n url: url,\n };\n } else {\n input;\n }",
|
||||
double: true,
|
||||
推荐: '.hl-vod-list;li;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||
一级: '.hl-vod-list&&.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||
二级: {
|
||||
title: '.hl-dc-title&&Text;.hl-dc-content&&li:eq(6)&&Text',
|
||||
img: '.hl-lazy&&data-original',
|
||||
desc: '.hl-dc-content&&li:eq(10)&&Text;.hl-dc-content&&li:eq(4)&&Text;.hl-dc-content&&li:eq(5)&&Text;.hl-dc-content&&li:eq(2)&&Text;.hl-dc-content&&li:eq(3)&&Text',
|
||||
content: '.hl-content-text&&Text',
|
||||
tabs: '.hl-tabs&&a',
|
||||
tab_text: 'a--span&&Text',
|
||||
lists: '.hl-plays-list:eq(#id)&&li',
|
||||
},
|
||||
搜索: '.hl-list-item;a&&title;a&&data-original;.remarks&&Text;a&&href',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
var rule = {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/channel/fyclass-fypage.html',
|
||||
searchUrl: '/search.html?wd=**',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
class_parse: '.menu_bottom ul li;a&&Text;a&&href;.*/(.*?).html',
|
||||
cate_exclude: '解析|动态',
|
||||
play_parse: true,
|
||||
lazy: "js:\n let html = request(input);\n let hconf = html.match(/r player_.*?=(.*?)</)[1];\n let json = JSON5.parse(hconf);\n let url = json.url;\n if (json.encrypt == '1') {\n url = unescape(url);\n } else if (json.encrypt == '2') {\n url = unescape(base64Decode(url));\n }\n if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {\n input = {\n parse: 0,\n jx: 0,\n url: url,\n };\n } else {\n input;\n }",
|
||||
limit: 6,
|
||||
double: true,
|
||||
推荐: '.indexShowBox;ul&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
||||
一级: '.pic-list&&li;a&&title;img&&data-src;.s1&&Text;a&&href',
|
||||
二级: {
|
||||
title: 'h1&&Text;.content-rt&&p:eq(0)&&Text',
|
||||
img: '.img&&img&&data-src',
|
||||
desc: '.content-rt&&p:eq(1)&&Text;.content-rt&&p:eq(2)&&Text;.content-rt&&p:eq(3)&&Text;.content-rt&&p:eq(4)&&Text;.content-rt&&p:eq(5)&&Text',
|
||||
content: '.zkjj_a&&Text',
|
||||
tabs: '.py-tabs&&option',
|
||||
lists: '.player:eq(#id) li',
|
||||
},
|
||||
搜索: '.sr_lists&&ul&&li;h3&&Text;img&&data-src;.int&&p:eq(0)&&Text;a&&href',
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
var rule = {
|
||||
title: '',
|
||||
host: '',
|
||||
class_name: '电影&电视剧&综艺&动漫',
|
||||
class_url: '1&2&3&4',
|
||||
searchUrl: '/index.php/ajax/suggest?mid=1&wd=**&limit=50',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
url: '/index.php/api/vod#type=fyclass&page=fypage',
|
||||
filterable: 0,
|
||||
filter_url: '',
|
||||
filter: {},
|
||||
filter_def: {},
|
||||
detailUrl: '/index.php/vod/detail/id/fyid.html',
|
||||
play_parse: true,
|
||||
lazy: "js:\n let html = request(input);\n let hconf = html.match(/r player_.*?=(.*?)</)[1];\n let json = JSON5.parse(hconf);\n let url = json.url;\n if (json.encrypt == '1') {\n url = unescape(url);\n } else if (json.encrypt == '2') {\n url = unescape(base64Decode(url));\n }\n if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {\n input = {\n parse: 0,\n jx: 0,\n url: url,\n };\n } else {\n input;\n }",
|
||||
limit: 6,
|
||||
推荐: '.list-vod.flex .public-list-box;a&&title;.lazy&&data-original;.public-list-prb&&Text;a&&href',
|
||||
一级: 'js:let body=input.split("#")[1];let t=Math.round(new Date/1e3).toString();let key=md5("DS"+t+"DCC147D11943AF75");let url=input.split("#")[0];body=body+"&time="+t+"&key="+key;print(body);fetch_params.body=body;let html=post(url,fetch_params);let data=JSON.parse(html);VODS=data.list.map(function(it){it.vod_pic=urljoin2(input.split("/i")[0],it.vod_pic);return it});',
|
||||
二级: {
|
||||
title: '.slide-info-title&&Text;.slide-info:eq(2)--strong&&Text',
|
||||
img: '.detail-pic&&data-original',
|
||||
desc: '.slide-info-remarks&&Text;.slide-info-remarks:eq(1)&&Text;.slide-info-remarks:eq(2)&&Text;.slide-info:eq(1)--strong&&Text;.info-parameter&&ul&&li:eq(3)&&Text',
|
||||
content: '#height_limit&&Text',
|
||||
tabs: '.anthology.wow.fadeInUp.animated&&.swiper-wrapper&&a',
|
||||
tab_text: 'a--span&&Text',
|
||||
lists: '.anthology-list-box:eq(#id) li',
|
||||
},
|
||||
搜索: 'json:list;name;pic;;id',
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
var rule = {
|
||||
title: '',
|
||||
host: '',
|
||||
homeTid: '13',
|
||||
homeUrl: '/api.php/provide/vod/?ac=detail&t={{rule.homeTid}}',
|
||||
detailUrl: '/api.php/provide/vod/?ac=detail&ids=fyid',
|
||||
searchUrl: '/api.php/provide/vod/?wd=**&pg=fypage',
|
||||
url: '/api.php/provide/vod/?ac=detail&pg=fypage&t=fyclass',
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
timeout: 5000,
|
||||
class_parse: 'json:class;',
|
||||
limit: 20,
|
||||
multi: 1,
|
||||
searchable: 2,
|
||||
quickSearch: 1,
|
||||
filterable: 0,
|
||||
play_parse: true,
|
||||
parse_url: '',
|
||||
lazy: "js:\n if (/\\.(m3u8|mp4)/.test(input)) {\n input = { parse: 0, url: input };\n } else {\n if (rule.parse_url.startsWith('json:')) {\n let purl = rule.parse_url.replace('json:', '') + input;\n let html = request(purl);\n let json = JSON.parse(html);\n if (json.url) {\n input = { parse: 0, url: json.url };\n }\n } else {\n input = rule.parse_url + input;\n }\n }",
|
||||
推荐: '*',
|
||||
一级: 'json:list;vod_name;vod_pic;vod_remarks;vod_id;vod_play_from',
|
||||
二级: 'js:\n let html=request(input);\n html=JSON.parse(html);\n let data=html.list;\n VOD=data[0];',
|
||||
搜索: '*',
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
var rule = {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/vodshow/fyclass--------fypage---/',
|
||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'MOBILE_UA',
|
||||
},
|
||||
class_parse: '.myui-header__menu li.hidden-sm:gt(0):lt(7);a&&Text;a&&href;/(\\d+).html',
|
||||
play_parse: true,
|
||||
lazy: "js:\n let html = request(input);\n let hconf = html.match(/r player_.*?=(.*?)</)[1];\n let json = JSON5.parse(hconf);\n let url = json.url;\n if (json.encrypt == '1') {\n url = unescape(url);\n } else if (json.encrypt == '2') {\n url = unescape(base64Decode(url));\n }\n if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {\n input = {\n parse: 0,\n jx: 0,\n url: url,\n };\n } else {\n input;\n }",
|
||||
limit: 6,
|
||||
double: true,
|
||||
推荐: 'ul.myui-vodlist.clearfix;li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
一级: '.myui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
二级: {
|
||||
title: '.myui-content__detail .title--span&&Text;.myui-content__detail p.data:eq(3)&&Text',
|
||||
img: '.myui-content__thumb .lazyload&&data-original',
|
||||
desc: '.myui-content__detail p.otherbox&&Text;.year&&Text;.myui-content__detail p.data:eq(4)&&Text;.myui-content__detail p.data:eq(2)&&Text;.myui-content__detail p.data:eq(0)&&Text',
|
||||
content: '.content&&Text',
|
||||
tabs: '.myui-panel__head&&li',
|
||||
lists: '.myui-content__list:eq(#id) li',
|
||||
},
|
||||
搜索: '#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&Text',
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
var rule = {
|
||||
title: '',
|
||||
host: '',
|
||||
url: '/list/fyclass-fypage.html',
|
||||
searchUrl: '/vodsearch/**----------fypage---.html',
|
||||
searchable: 2,
|
||||
quickSearch: 0,
|
||||
filterable: 0,
|
||||
headers: {
|
||||
'User-Agent': 'UC_UA',
|
||||
},
|
||||
class_parse: '.stui-header__menu li:gt(0):lt(7);a&&Text;a&&href;.*/(.*?).html',
|
||||
play_parse: true,
|
||||
lazy: "js:\n let html = request(input);\n let hconf = html.match(/r player_.*?=(.*?)</)[1];\n let json = JSON5.parse(hconf);\n let url = json.url;\n if (json.encrypt == '1') {\n url = unescape(url);\n } else if (json.encrypt == '2') {\n url = unescape(base64Decode(url));\n }\n if (/\\.(m3u8|mp4|m4a|mp3)/.test(url)) {\n input = {\n parse: 0,\n jx: 0,\n url: url,\n };\n } else {\n input;\n }",
|
||||
limit: 6,
|
||||
double: true,
|
||||
推荐: 'ul.stui-vodlist.clearfix;li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href',
|
||||
一级: '.stui-vodlist li;a&&title;a&&data-original;.pic-text&&Text;a&&href',
|
||||
二级: {
|
||||
title: '.stui-content__detail .title&&Text;.stui-content__detail&&p:eq(-2)&&a&&Text',
|
||||
title1: '.stui-content__detail .title&&Text;.stui-content__detail&&p&&Text',
|
||||
img: '.stui-content__thumb .lazyload&&data-original',
|
||||
desc: '.stui-content__detail p&&Text;.stui-content__detail&&p:eq(-2)&&a:eq(2)&&Text;.stui-content__detail&&p:eq(-2)&&a:eq(1)&&Text;.stui-content__detail p:eq(2)&&Text;.stui-content__detail p:eq(1)&&Text',
|
||||
desc1: '.stui-content__detail p:eq(4)&&Text;;;.stui-content__detail p:eq(1)&&Text',
|
||||
content: '.detail&&Text',
|
||||
tabs: '.stui-pannel__head h3',
|
||||
tabs1: '.stui-vodlist__head h3',
|
||||
lists: '.stui-content__playlist:eq(#id) li',
|
||||
},
|
||||
搜索: 'ul.stui-vodlist__media,ul.stui-vodlist,#searchList li;a&&title;.lazyload&&data-original;.pic-text&&Text;a&&href;.detail&&Text',
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"*":[{"key":"*","name":"*","value":[{"n":"*","v":"*"}]}]}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"1":[{"key":"类型","name":"类型","value":[{"n":"动作片","v":"5"},{"n":"爱情片","v":"6"},{"n":"科幻片","v":"7"},{"n":"恐怖片","v":"8"},{"n":"战争片","v":"9"},{"n":"喜剧片","v":"10"},{"n":"动画片","v":"11"},{"n":"剧情片","v":"12"}]},{"key":"剧情","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":"恐怖"},{"n":"惊悚","v":"惊悚"},{"n":"剧情","v":"剧情"},{"n":"都市","v":"都市"},{"n":"偶像","v":"偶像"},{"n":"言情","v":"言情"},{"n":"家庭","v":"家庭"},{"n":"历史","v":"历史"},{"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":"地区","name":"地区","value":[{"n":"中国","v":"中国"},{"n":"中国香港","v":"中国香港"},{"n":"中国台湾","v":"中国台湾"},{"n":"日本","v":"日本"},{"n":"韩国","v":"韩国"},{"n":"美国","v":"美国"},{"n":"泰国","v":"泰国"},{"n":"越南","v":"越南"},{"n":"菲律宾","v":"菲律宾"},{"n":"其他","v":"其他"}]},{"key":"年份","name":"年份","value":[{"n":"2025","v":"2025"},{"n":"2024","v":"2024"},{"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":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"more","v":"more"}]},{"key":"语言","name":"语言","value":[{"n":"国语","v":"国语"},{"n":"粤语","v":"粤语"},{"n":"英语","v":"英语"},{"n":"日语","v":"日语"},{"n":"韩语","v":"韩语"},{"n":"泰语","v":"泰语"},{"n":"法语","v":"法语"}]},{"key":"字母","name":"字母","value":[{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":"排序","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hit"},{"n":"评分","v":"commend"}]}],
|
||||
"2":[{"key":"类型","name":"类型","value":[{"n":"国产剧","v":"13"},{"n":"港台剧","v":"14"},{"n":"欧美剧","v":"15"},{"n":"日韩剧","v":"16"},{"n":"海外剧","v":"25"}]},{"key":"剧情","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":"恐怖"},{"n":"惊悚","v":"惊悚"},{"n":"剧情","v":"剧情"},{"n":"都市","v":"都市"},{"n":"偶像","v":"偶像"},{"n":"言情","v":"言情"},{"n":"家庭","v":"家庭"},{"n":"历史","v":"历史"},{"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":"地区","name":"地区","value":[{"n":"中国","v":"中国"},{"n":"中国香港","v":"中国香港"},{"n":"中国台湾","v":"中国台湾"},{"n":"日本","v":"日本"},{"n":"韩国","v":"韩国"},{"n":"美国","v":"美国"},{"n":"泰国","v":"泰国"},{"n":"越南","v":"越南"},{"n":"菲律宾","v":"菲律宾"},{"n":"其他","v":"其他"}]},{"key":"年份","name":"年份","value":[{"n":"2025","v":"2025"},{"n":"2024","v":"2024"},{"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":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"more","v":"more"}]},{"key":"语言","name":"语言","value":[{"n":"国语","v":"国语"},{"n":"粤语","v":"粤语"},{"n":"英语","v":"英语"},{"n":"日语","v":"日语"},{"n":"韩语","v":"韩语"},{"n":"泰语","v":"泰语"},{"n":"法语","v":"法语"}]},{"key":"字母","name":"字母","value":[{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":"排序","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hit"},{"n":"评分","v":"commend"}]}],
|
||||
"3":[{"key":"类型","name":"类型","value":[{"n":"泰剧","v":"3"}]},{"key":"剧情","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":"恐怖"},{"n":"惊悚","v":"惊悚"},{"n":"剧情","v":"剧情"},{"n":"都市","v":"都市"},{"n":"偶像","v":"偶像"},{"n":"言情","v":"言情"},{"n":"家庭","v":"家庭"},{"n":"历史","v":"历史"},{"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":"地区","name":"地区","value":[{"n":"中国","v":"中国"},{"n":"中国香港","v":"中国香港"},{"n":"中国台湾","v":"中国台湾"},{"n":"日本","v":"日本"},{"n":"韩国","v":"韩国"},{"n":"美国","v":"美国"},{"n":"泰国","v":"泰国"},{"n":"越南","v":"越南"},{"n":"菲律宾","v":"菲律宾"},{"n":"其他","v":"其他"}]},{"key":"年份","name":"年份","value":[{"n":"2025","v":"2025"},{"n":"2024","v":"2024"},{"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":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"more","v":"more"}]},{"key":"语言","name":"语言","value":[{"n":"国语","v":"国语"},{"n":"粤语","v":"粤语"},{"n":"英语","v":"英语"},{"n":"日语","v":"日语"},{"n":"韩语","v":"韩语"},{"n":"泰语","v":"泰语"},{"n":"法语","v":"法语"}]},{"key":"字母","name":"字母","value":[{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":"排序","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hit"},{"n":"评分","v":"commend"}]}],
|
||||
"4":[{"key":"类型","name":"类型","value":[{"n":"动漫","v":"4"}]},{"key":"剧情","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":"恐怖"},{"n":"惊悚","v":"惊悚"},{"n":"剧情","v":"剧情"},{"n":"都市","v":"都市"},{"n":"偶像","v":"偶像"},{"n":"言情","v":"言情"},{"n":"家庭","v":"家庭"},{"n":"历史","v":"历史"},{"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":"地区","name":"地区","value":[{"n":"中国","v":"中国"},{"n":"中国香港","v":"中国香港"},{"n":"中国台湾","v":"中国台湾"},{"n":"日本","v":"日本"},{"n":"韩国","v":"韩国"},{"n":"美国","v":"美国"},{"n":"泰国","v":"泰国"},{"n":"越南","v":"越南"},{"n":"菲律宾","v":"菲律宾"},{"n":"其他","v":"其他"}]},{"key":"年份","name":"年份","value":[{"n":"2025","v":"2025"},{"n":"2024","v":"2024"},{"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":"2014","v":"2014"},{"n":"2013","v":"2013"},{"n":"2012","v":"2012"},{"n":"2011","v":"2011"},{"n":"2010","v":"2010"},{"n":"2009","v":"2009"},{"n":"more","v":"more"}]},{"key":"语言","name":"语言","value":[{"n":"国语","v":"国语"},{"n":"粤语","v":"粤语"},{"n":"英语","v":"英语"},{"n":"日语","v":"日语"},{"n":"韩语","v":"韩语"},{"n":"泰语","v":"泰语"},{"n":"法语","v":"法语"}]},{"key":"字母","name":"字母","value":[{"n":"A","v":"A"},{"n":"B","v":"B"},{"n":"C","v":"C"},{"n":"D","v":"D"},{"n":"E","v":"E"},{"n":"F","v":"F"},{"n":"G","v":"G"},{"n":"H","v":"H"},{"n":"I","v":"I"},{"n":"J","v":"J"},{"n":"K","v":"K"},{"n":"L","v":"L"},{"n":"M","v":"M"},{"n":"N","v":"N"},{"n":"O","v":"O"},{"n":"P","v":"P"},{"n":"Q","v":"Q"},{"n":"R","v":"R"},{"n":"S","v":"S"},{"n":"T","v":"T"},{"n":"U","v":"U"},{"n":"V","v":"V"},{"n":"W","v":"W"},{"n":"X","v":"X"},{"n":"Y","v":"Y"},{"n":"Z","v":"Z"},{"n":"0-9","v":"0-9"}]},{"key":"排序","name":"排序","value":[{"n":"时间","v":"time"},{"n":"人气","v":"hit"},{"n":"评分","v":"commend"}]}]
|
||||
}
|
||||
Reference in New Issue
Block a user