Sync all projects
This commit is contained in:
@@ -0,0 +1,252 @@
|
||||
/**
|
||||
* 3Q影视 爬虫
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2025-12-17
|
||||
* 发布页 https://qqqys.com
|
||||
*
|
||||
* @config
|
||||
// * debug: true
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://qqqys.com';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*/
|
||||
async function init(cfg) {
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "电影", type_name: "电影" },
|
||||
{ type_id: "剧集", type_name: "剧集" },
|
||||
{ type_id: "动漫", type_name: "动漫" },
|
||||
{ type_id: "综艺", type_name: "综艺" }
|
||||
],
|
||||
filters: {
|
||||
"电影": [
|
||||
{ key: "class", 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:"剧情"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"}, {n:"泰国",v:"泰国"}, {n:"印度",v:"印度"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"德国",v:"德国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"意大利",v:"意大利"}, {n:"澳大利亚",v:"澳大利亚"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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-2011",v:"2015-2011"}, {n:"2010-2000",v:"2010-2000"}, {n:"90年代",v:"90年代"}, {n:"80年代",v:"80年代"}, {n:"更早",v:"更早"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"人气",v:"hits"}, {n:"最新",v:"time"}, {n:"评分",v:"score"}, {n:"年份",v:"year"} ] }
|
||||
],
|
||||
"剧集": [
|
||||
{ key: "class", 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:"恐怖"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"}, {n:"泰国",v:"泰国"}, {n:"英国",v:"英国"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {n:"2025",v:"2025"}, {n:"2024",v:"2024"}, {n:"2023",v:"2023"}, {n:"2022",v:"2022"}, {n:"2021",v:"2021"}, {n:"2020-2016",v:"2020-2016"}, {n:"2015-2011",v:"2015-2011"}, {n:"2010-2000",v:"2010-2000"}, {n:"更早",v:"更早"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"人气",v:"hits"}, {n:"最新",v:"time"}, {n:"评分",v:"score"}, {n:"年份",v:"year"} ] }
|
||||
],
|
||||
"动漫": [
|
||||
{ key: "class", name: "类型", value: [ {n:"全部",v:""}, {n:"冒险",v:"冒险"}, {n:"奇幻",v:"奇幻"}, {n:"科幻",v:"科幻"}, {n:"武侠",v:"武侠"}, {n:"悬疑",v:"悬疑"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"日本",v:"日本"}, {n:"欧美",v:"欧美"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"更早",v:"更早"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"人气",v:"hits"}, {n:"最新",v:"time"}, {n:"评分",v:"score"}, {n:"年份",v:"year"} ] }
|
||||
],
|
||||
"综艺": [
|
||||
{ key: "class", name: "类型", value: [ {n:"全部",v:""}, {n:"真人秀",v:"真人秀"}, {n:"音乐",v:"音乐"}, {n:"脱口秀",v:"脱口秀"}, {n:"歌舞",v:"歌舞"}, {n:"爱情",v:"爱情"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"更早",v:"更早"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"人气",v:"hits"}, {n:"最新",v:"time"}, {n:"评分",v:"score"}, {n:"年份",v:"year"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
let res = Java.req(baseUrl);
|
||||
if (res.error) return Result.error('获取数据失败:' + res.error);
|
||||
const doc = res.doc;
|
||||
const videos = parseVideoList(doc);
|
||||
|
||||
return { list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
const area = extend.area || '';
|
||||
const year = extend.year || '';
|
||||
const cat = extend.class || '';
|
||||
const sort = extend.sort || '';
|
||||
let res = Java.req(`${baseUrl}/api.php/filter/vod?type_name=${tid}&class=${cat}&year=${year}&area=${area}&sort=${sort}&page=${pg}&limit=24`);
|
||||
if (res.error) return Result.error('获取数据失败:' + res.error);
|
||||
const result = JSON.parse(res.body);
|
||||
result.list = result.data;
|
||||
delete result.data;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
let res = Java.req(`${baseUrl}/vd/${ids[0]}.html`);
|
||||
if (res.error) return Result.error('详情获取失败:' + res.error);
|
||||
let j = Java.req(`${baseUrl}/api.php/internal/search_aggregate?vod_id=${ids[0]}`);
|
||||
const jsonData = JSON.parse(j.body);
|
||||
const vods = parseDetailPage(res.doc, jsonData, ids[0]);
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list: vods };
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
let res = await Java.req(`${baseUrl}/vodsearch/${key}--/page/${pg}.html`);
|
||||
const vods = [];
|
||||
const items = res.doc.querySelectorAll('div.p-2 > div');
|
||||
|
||||
items.forEach(item => {
|
||||
const link = item.querySelector('a[href*="/vd/"]');
|
||||
if (!link) return;
|
||||
|
||||
const href = link.getAttribute('href');
|
||||
const vod_id = href.match(/\/vd\/(\d+)\.html/)?.[1] || '';
|
||||
|
||||
const nameEl = item.querySelector('.text-\\[16px\\] span strong') ||
|
||||
item.querySelector('.text-\\[16px\\] strong') ||
|
||||
item.querySelector('div.ml-\\[105px\\] strong');
|
||||
const vod_name = nameEl?.textContent?.trim() || '';
|
||||
|
||||
const img = item.querySelector('img[data-original]');
|
||||
const vod_pic = img?.getAttribute('data-original') || '';
|
||||
|
||||
const remarkDiv = item.querySelector('div[class*="bottom-0"][class*="right-0"]') ||
|
||||
item.querySelector('div[style*="gradient"]');
|
||||
const vod_remarks = remarkDiv?.textContent?.trim() || '';
|
||||
|
||||
if (vod_id && vod_name) {
|
||||
vods.push({
|
||||
vod_id: vod_id,
|
||||
vod_name: vod_name,
|
||||
vod_pic: vod_pic,
|
||||
vod_remarks: vod_remarks
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
const totalText = document.querySelector('.mac_total')?.textContent || '0';
|
||||
const total = parseInt(totalText) || vods.length;
|
||||
const pagecount = Math.ceil(total / 15);
|
||||
|
||||
const pageMatch = window.location.href.match(/page\/(\d+)\.html/);
|
||||
const page = pageMatch ? parseInt(pageMatch[1]) : 1;
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: vods,
|
||||
page: page,
|
||||
pagecount: pagecount,
|
||||
limit: 15,
|
||||
total: total
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 0 };
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList(document) {
|
||||
const vods = [];
|
||||
const items = document.querySelectorAll('.grid-cols-3 > div');
|
||||
|
||||
items.forEach(item => {
|
||||
const link = item.querySelector('a');
|
||||
const img = item.querySelector('img');
|
||||
const remarkDiv = item.querySelector('.absolute.right-0.bottom-0.left-0');
|
||||
|
||||
let vod_id = '';
|
||||
const href = link?.getAttribute('href') || '';
|
||||
if (href.includes('/vd/')) {
|
||||
vod_id = href.match(/\/vd\/(\d+)\.html/)?.[1] || '';
|
||||
} else if (href.includes('.html')) {
|
||||
vod_id = href.match(/(\d+)\.html/)?.[1] || '';
|
||||
}
|
||||
|
||||
const vod = {
|
||||
vod_id: vod_id,
|
||||
vod_name: link?.getAttribute('title') || '',
|
||||
vod_pic: img?.getAttribute('data-original') || '',
|
||||
vod_remarks: remarkDiv?.textContent?.trim() || '',
|
||||
};
|
||||
|
||||
vods.push(vod);
|
||||
});
|
||||
|
||||
return vods;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(doc, jsonData, vod_id) {
|
||||
const vod_name = doc.querySelector('.module-info-heading h1')?.textContent?.trim() || '';
|
||||
const vod_pic = doc.querySelector('img[data-original]')?.getAttribute('data-original') || '';
|
||||
const vod_content = doc.querySelector('.module-info-content .line-clamp-5 p')?.textContent?.trim() || '';
|
||||
|
||||
const infoDivs = doc.querySelectorAll('.module-info-heading > div > div');
|
||||
const vod_remark = Array.from(infoDivs).map(div =>
|
||||
div.textContent.replace(/[\t\n]/g, '').trim()
|
||||
).filter(text => text).join(' / ');
|
||||
|
||||
const vod_play_from = jsonData.data?.map(item => item.site_name).filter(Boolean).join('$$$') || '';
|
||||
const vod_play_url = jsonData.data?.map(item =>
|
||||
item.vod_play_url?.replace(/\t+/g, '').trim()
|
||||
).filter(Boolean).join('$$$') || '';
|
||||
|
||||
const flexItems = doc.querySelectorAll('.module-info-content .flex');
|
||||
let vod_director = '';
|
||||
let vod_actor = '';
|
||||
|
||||
flexItems.forEach(item => {
|
||||
const span = item.querySelector('span');
|
||||
if (span?.textContent.includes('导演')) {
|
||||
const directorLinks = item.querySelectorAll('a');
|
||||
if (directorLinks.length > 0) {
|
||||
const vod_director = Array.from(directorLinks).map(link => link.textContent.trim());
|
||||
}
|
||||
} else if (span?.textContent.includes('主演')) {
|
||||
const actorLinks = item.querySelectorAll('a');
|
||||
if (actorLinks.length > 0) {
|
||||
const vod_actor = Array.from(actorLinks).map(link => link.textContent.trim());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return [{
|
||||
vod_id: vod_id,
|
||||
vod_name: vod_name,
|
||||
vod_pic: vod_pic,
|
||||
vod_director: vod_director,
|
||||
vod_actor: vod_actor,
|
||||
vod_remark: vod_remark,
|
||||
vod_content: vod_content,
|
||||
vod_play_from: vod_play_from,
|
||||
vod_play_url: vod_play_url
|
||||
}];
|
||||
}
|
||||
@@ -0,0 +1,245 @@
|
||||
/**
|
||||
* 剧圈圈在线(www.jqqzx.top)爬虫
|
||||
* 版本:3.0 - WvSpider v2.0 新架构
|
||||
* 最后更新:2025-12-23
|
||||
* 发布页 https://www.555u.club/
|
||||
*
|
||||
* @config
|
||||
// * debug: true
|
||||
// * showWebView: true
|
||||
*
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://www.55i5m2t9p6.shop';
|
||||
|
||||
/**
|
||||
* 初始化方法
|
||||
*/
|
||||
function init(cfg) {
|
||||
console.log('初始化被调用')
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "1", type_name: "电影" },
|
||||
{ type_id: "2", type_name: "连续剧" },
|
||||
{ type_id: "3", type_name: "综艺" },
|
||||
{ type_id: "4", type_name: "动漫" },
|
||||
{ type_id: "124", type_name: "福利" }
|
||||
],
|
||||
filters: {
|
||||
"1": [
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"德国",v:"德国"}, {n:"印度",v:"印度"}, {n:"泰国",v:"泰国"}, {n:"丹麦",v:"丹麦"}, {n:"瑞典",v:"瑞典"}, {n:"巴西",v:"巴西"}, {n:"加拿大",v:"加拿大"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"意大利",v:"意大利"}, {n:"比利时",v:"比利时"}, {n:"爱尔兰",v:"爱尔兰"}, {n:"西班牙",v:"西班牙"}, {n:"澳大利亚",v:"澳大利亚"} ] },
|
||||
{ key: "type", name: "类型", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {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:"同性"}, {n:"励志",v:"励志"}, {n:"人性",v:"人性"}, {n:"美食",v:"美食"}, {n:"女性",v:"女性"}, {n:"治愈",v:"治愈"}, {n:"历史",v:"历史"}, {n:"真人秀",v:"真人秀"}, {n:"脱口秀",v:"脱口秀"} ] },
|
||||
{ key: "lang", 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:"西班牙语"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"90年代",v:"90年代"}, {n:"80年代",v:"80年代"}, {n:"70年代",v:"70年代"}, {n:"更早",v:"更早"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"2": [
|
||||
{ key: "type", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {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:"灾难"}, {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: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"韩国",v:"韩国"}, {n:"美国",v:"美国"}, {n:"日本",v:"日本"}, {n:"法国",v:"法国"}, {n:"英国",v:"英国"}, {n:"德国",v:"德国"}, {n:"台湾",v:"台湾"}, {n:"泰国",v:"泰国"}, {n:"印度",v:"印度"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"90年代",v:"90年代"}, {n:"80年代",v:"80年代"}, {n:"70年代",v:"70年代"}, {n:"更早",v:"更早"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"3": [
|
||||
{ key: "type", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {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: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"韩国",v:"韩国"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "lang", name: "语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"90年代",v:"90年代"}, {n:"80年代",v:"80年代"}, {n:"70年代",v:"70年代"}, {n:"更早",v:"更早"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"4": [
|
||||
{ key: "type", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {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:"电影版"}, {n:"OVA版",v:"OVA版"}, {n:"TV版",v:"TV版"}, {n:"新番动画",v:"新番动画"}, {n:"完结动画",v:"完结动画"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"日本",v:"日本"}, {n:"欧美",v:"欧美"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "lang", name: "语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"90年代",v:"90年代"}, {n:"80年代",v:"80年代"}, {n:"70年代",v:"70年代"}, {n:"更早",v:"更早"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const res = Java.req(baseUrl);
|
||||
if (res.error) return Result.error('获取数据失败:' + res.error);
|
||||
|
||||
const document = res.doc;
|
||||
return { list: parseVideoList(document) };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类列表
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
const area = extend.area || '';
|
||||
const year = extend.year || '';
|
||||
const type = extend.type || '';
|
||||
const sort = extend.sort || '';
|
||||
const lang = extend.lang || '';
|
||||
|
||||
const res = Java.req(`${baseUrl}/vodshow/${tid}-${area}-${sort}-${type}-${lang}----${pg}---${year}.html`);
|
||||
if (res.error) return Result.error('获取数据失败:' + res.error);
|
||||
|
||||
const document = res.doc;
|
||||
const pagecount = parseInt(res.body.match(/href="[^"]*?-(\d+)---[^"]*"[^>]+title="尾页"/)?.[1] || '1');
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: parseVideoList(document),
|
||||
page: parseInt(pg) || 1,
|
||||
pagecount: pagecount,
|
||||
limit: 12,
|
||||
total: pagecount * 12
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
// console.log('获取到的id', ids);
|
||||
|
||||
const res = Java.req(baseUrl + ids[0]);
|
||||
const document = res.doc;
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: parseDetailPage(document, ids[0]),
|
||||
page: 1,
|
||||
pagecount: 1,
|
||||
limit: 1,
|
||||
total: 1
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
const url = `${baseUrl}/vodsearch/${key}----------${pg}---.html`;
|
||||
|
||||
let res = Java.req(url);
|
||||
|
||||
const vods = [];
|
||||
const items = res.doc.querySelectorAll('.module-card-item');
|
||||
|
||||
items.forEach(item => {
|
||||
const playLink = item.querySelector('.play-btn-o');
|
||||
const vod = {
|
||||
vod_id: playLink?.getAttribute('href') || '',
|
||||
vod_name: item.querySelector('strong')?.textContent?.trim() || '',
|
||||
vod_pic: item.querySelector('img')?.getAttribute('data-original') || '',
|
||||
vod_remarks: item.querySelector('.module-item-note')?.textContent?.trim() || '',
|
||||
};
|
||||
vods.push(vod);
|
||||
});
|
||||
|
||||
const totalText = res.doc.querySelector('.mac_total')?.textContent || '0';
|
||||
const total = parseInt(totalText) || 0;
|
||||
|
||||
const pageText = res.doc.querySelector('.page-current')?.textContent || '1';
|
||||
const page = parseInt(pageText) || 1;
|
||||
|
||||
const lastPageLink = res.doc.querySelector('a[title="尾页"]');
|
||||
let pagecount = 1;
|
||||
if (lastPageLink) {
|
||||
const href = lastPageLink.getAttribute('href');
|
||||
const match = href.match(/(\d+)---/);
|
||||
if (match) {
|
||||
pagecount = parseInt(match[1]) || 1;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: vods,
|
||||
page: page,
|
||||
pagecount: pagecount,
|
||||
limit: 20,
|
||||
total: total
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 1 };
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList(document) {
|
||||
const vods = [];
|
||||
const items = document.querySelectorAll('.module-poster-item');
|
||||
|
||||
items.forEach(item => {
|
||||
const vod = {
|
||||
vod_id: item?.getAttribute('href') || '',
|
||||
vod_name: item.querySelector('.module-poster-item-title')?.textContent?.trim() || '',
|
||||
vod_pic: item.querySelector('img')?.getAttribute('data-original') || '',
|
||||
vod_remarks: item.querySelector('.module-item-note')?.textContent?.trim() || '',
|
||||
};
|
||||
vods.push(vod);
|
||||
});
|
||||
|
||||
return vods;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(document, vid) {
|
||||
const text = s => document.querySelector(s)?.textContent?.trim() || '';
|
||||
const attr = (s, a) => document.querySelector(s)?.getAttribute(a) || '';
|
||||
const findInfo = label => [...document.querySelectorAll('.module-info-item')].find(el => el.textContent.includes(label));
|
||||
|
||||
const playUrls = [];
|
||||
document.querySelectorAll('.his-tab-list').forEach(list => {
|
||||
const eps = [...list.querySelectorAll('.module-play-list-link')].map(link => {
|
||||
const name = link.querySelector('span')?.textContent?.trim();
|
||||
const url = baseUrl + link.getAttribute('href');
|
||||
return name && url ? `${name}$${url}` : null;
|
||||
}).filter(Boolean);
|
||||
if (eps.length) playUrls.push(eps.join('#'));
|
||||
});
|
||||
|
||||
|
||||
const playFrom = [...document.querySelectorAll('.module-tab-item span')]
|
||||
.map(s => s.textContent.trim())
|
||||
.filter(Boolean)
|
||||
.join('$$$');
|
||||
|
||||
return [{
|
||||
vod_id: vid,//location.href,
|
||||
vod_name: text('.module-info-heading h1'),
|
||||
vod_pic: attr('.module-item-pic img', 'data-original'),
|
||||
vod_remarks: findInfo('集数')?.querySelector('.module-info-item-content')?.textContent?.trim() || '',
|
||||
vod_year: attr('.module-info-tag-link a[title*="202"]', 'title'),
|
||||
vod_director: findInfo('导演')
|
||||
? [...findInfo('导演').querySelectorAll('a')].map(a => a.textContent.trim()).join('/')
|
||||
: '',
|
||||
vod_actor: findInfo('主演')
|
||||
? [...findInfo('主演').querySelectorAll('a')].map(a => a.textContent.trim()).join('/')
|
||||
: '',
|
||||
vod_content: text('.module-info-introduction-content p'),
|
||||
vod_play_from: playFrom,
|
||||
vod_play_url: playUrls.join('$$$')
|
||||
}];
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
/**
|
||||
* 低端影视(ddys.run)爬虫
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2025-12-17
|
||||
* 发布页:https://www.ddys.diy/
|
||||
*
|
||||
* @config
|
||||
// * debug: true
|
||||
// * showWebView: true
|
||||
* percent: 80,60
|
||||
* returnType: dom
|
||||
* timeout: 30
|
||||
* keywords: 系统安全验证|系统提示......|人机验证
|
||||
* blockImages: true
|
||||
* blockList: *.[ico|png|jpeg|jpg|gif|webp]*|*.css|*.js
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
const baseUrl = 'https://www.ddys.run';
|
||||
const headers = { 'Referer': baseUrl };
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
async function init(cfg) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "1", type_name: "电影" },
|
||||
{ type_id: "2", type_name: "电视剧" },
|
||||
{ type_id: "4", type_name: "动漫" }
|
||||
],
|
||||
filters: {
|
||||
"1": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"动作片",v:"dongzuopian"}, {n:"剧情片",v:"juqingpian"}, {n:"冒险片",v:"maoxianpian"}, {n:"惊悚片",v:"jingsongpian"}, {n:"喜剧片",v:"xijupian"}, {n:"爱情片",v:"aiqingpian"}, {n:"科幻片",v:"kehuanpian"}, {n:"战争片",v:"zhanzhengpian"}, {n:"警匪片",v:"jingfeipian"}, {n:"犯罪片",v:"fanzuipian"}, {n:"恐怖片",v:"kongbupian"}, {n:"悬疑片",v:"xuanyipian"}, {n:"灾难片",v:"zainanpian"}, {n:"奇幻片",v:"qihuanpian"}, {n:"动画片",v:"donghuapian"}, {n:"其他片",v:"qitapian"} ] },
|
||||
{ key: "class", 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:"网络电影"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"法国",v:"法国"}, {n:"英国",v:"英国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"}, {n:"德国",v:"德国"}, {n:"泰国",v:"泰国"}, {n:"印度",v:"印度"}, {n:"意大利",v:"意大利"}, {n:"西班牙",v:"西班牙"}, {n:"加拿大",v:"加拿大"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"法语",v:"法语"}, {n:"德语",v:"德语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"2": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"国产剧",v:"guochanju"}, {n:"港台剧",v:"gangtaiju"}, {n:"日韩剧",v:"rihanju"}, {n:"欧美剧",v:"oumeiju"}, {n:"泰国剧",v:"taiguoju"}, {n:"其他剧",v:"qitaju"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"内地",v:"内地"}, {n:"韩国",v:"韩国"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"泰国",v:"泰国"}, {n:"英国",v:"英国"}, {n:"新加坡",v:"新加坡"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"4": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"日韩动漫",v:"rihandongman"}, {n:"国产动漫",v:"guochandongman"}, {n:"欧美动漫",v:"oumeidongman"}, {n:"港台动漫",v:"gangtaidongman"}, {n:"其他动漫",v:"qitadongman"} ] },
|
||||
// { key: "class", 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:"其他"} ] },
|
||||
// { key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"国产",v:"国产"}, {n:"日本",v:"日本"}, {n:"欧美",v:"欧美"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(`${baseUrl}/`); // 使用模板字符串
|
||||
const videos = parseVideoList(document);
|
||||
return { list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
|
||||
const area = extend.area || '';
|
||||
const year = extend.year || '';
|
||||
const cat = extend.class || '';
|
||||
const sort = extend.sort || '';
|
||||
const type = extend.type || tid;
|
||||
const lang = extend.lang || '';
|
||||
|
||||
// console.log("筛选参数:", extend, `type=${type}, area=${area}, year=${year}, cat=${cat}, sort=${sort}, lang=${lang}`);
|
||||
const document = await Java.wvOpen(`${baseUrl}/list/${type||tid}-${area}-${sort}-${cat}-${lang}----${pg}---${year}.html`);
|
||||
const videos = parseVideoList(document);
|
||||
const getPages = document.querySelector("ul > li.active.num").outerText;
|
||||
const pages = getPages.split('/');
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total: pages[1] * 12 };
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
// Java.showWebView();
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
const list = parseDetailPage(document);
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list };
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
let res = await Java.req(`${baseUrl}/search/${key}----------${pg}---.html`);
|
||||
const videos = parseVideoList(res.doc);
|
||||
let pages = [1, 1];
|
||||
let total = videos.length;
|
||||
try {
|
||||
const getPages = res.doc.querySelector("ul > li.active.num").outerText;
|
||||
pages = getPages.split('/');
|
||||
total = parseInt(pages[1]) * 12;
|
||||
} catch (e) {}
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total };
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 1 };
|
||||
}
|
||||
|
||||
/**
|
||||
* action
|
||||
*/
|
||||
async function action(actionStr) {
|
||||
try {
|
||||
const params = JSON.parse(actionStr);
|
||||
console.log("action params:", params);
|
||||
} catch (e) {
|
||||
console.log("action is not JSON, treat as string");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList(document) {
|
||||
const boxes = Array.from(document.querySelectorAll('.stui-vodlist__box'));
|
||||
const list = boxes.map(box => {
|
||||
const titleEl = box.querySelector('.title a');
|
||||
const thumbEl = box.querySelector('.stui-vodlist__thumb');
|
||||
const remarksEl = box.querySelector('.pic-text');
|
||||
|
||||
// 处理 vod_id
|
||||
let vodId = titleEl?.getAttribute('href') || '';
|
||||
if (vodId && !vodId.startsWith('http')) {
|
||||
vodId = baseUrl + (vodId.startsWith('/') ? '' : '/') + vodId;
|
||||
}
|
||||
|
||||
return {
|
||||
vod_name: titleEl?.title || titleEl?.textContent || '',
|
||||
vod_pic: thumbEl?.getAttribute('data-original') ||
|
||||
thumbEl?.style.backgroundImage?.match(/url\(["']?([^"')]+)["']?\)/)?.[1] || '',
|
||||
vod_remarks: remarksEl?.textContent || '',
|
||||
vod_id: vodId,
|
||||
vod_actor: (() => {
|
||||
const textEl = box.querySelector('.text');
|
||||
const comment = textEl?.previousSibling;
|
||||
return comment?.nodeType === 8 ? comment.textContent.trim() : '';
|
||||
})()
|
||||
};
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(document) {
|
||||
const title = document.querySelector('.stui-content__detail .title')?.textContent.trim() || '';
|
||||
const vod_pic = document.querySelector('.stui-content__thumb img')?.src || '';
|
||||
const info = document.querySelectorAll('.stui-content__detail .data');
|
||||
|
||||
const typeMatch = info[0]?.textContent.match(/类型:([^/]+)\s*\/\s*地区:([^/]+)\s*\/\s*年份:(\d+)/) || [];
|
||||
const type_name = typeMatch[1] || '', vod_area = typeMatch[2] || '', vod_year = typeMatch[3] || '';
|
||||
const vod_actor = info[1]?.textContent.replace('主演:', '').trim() || '';
|
||||
const vod_director = info[2]?.textContent.replace('导演:', '').trim() || '';
|
||||
const vod_remarks = info[3]?.textContent.replace('更新:', '').trim() || '';
|
||||
const vod_content = document.querySelector('.detail-content')?.textContent.trim() ||
|
||||
document.querySelector('.detail-sketch')?.textContent.trim() || '';
|
||||
|
||||
// 播放线路
|
||||
const head = document.querySelector('.stui-vodlist__head h3');
|
||||
const ul = document.querySelector('.stui-content__playlist');
|
||||
const episodes = ul ? Array.from(ul.querySelectorAll('a')).map(a =>
|
||||
`${a.textContent.trim()}$${baseUrl + a.getAttribute('href')}`) : [];
|
||||
const vod_play_from = head ? head.textContent.trim().replace('在线播放', '线路') : '';
|
||||
const vod_play_url = episodes.join('#');
|
||||
|
||||
return [{
|
||||
vod_id: window.location.pathname.replace(/[^\w]/g, '_'),
|
||||
vod_name: title,
|
||||
vod_pic: vod_pic,
|
||||
vod_remarks: vod_remarks,
|
||||
vod_year: vod_year,
|
||||
vod_actor: vod_actor,
|
||||
vod_director: vod_director,
|
||||
vod_area: vod_area,
|
||||
vod_lang: vod_area.includes('大陆') ? '国语' : '其他',
|
||||
vod_content: vod_content,
|
||||
vod_play_from: vod_play_from,
|
||||
vod_play_url: vod_play_url
|
||||
}];
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
/**
|
||||
* 修罗影视 爬虫
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2025-12-17
|
||||
* 发布页 https://xlys.me/
|
||||
*
|
||||
* @config
|
||||
* debug: true
|
||||
// * showWebView: true
|
||||
* percent: 80,60
|
||||
* returnType: dom
|
||||
* timeout: 30
|
||||
* blockImages: true
|
||||
* blockList: *.[ico|png|jpeg|jpg|gif|webp]*|*.css|*rosfky.cn*|*zzz*|*3s3peo*|*google*|*.js*
|
||||
*
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://www.xlys02.com';
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*/
|
||||
async function init(cfg) {
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{type_id: "dongzuo", type_name: "动作"},
|
||||
{type_id: "aiqing", type_name: "爱情"},
|
||||
{type_id: "xiju", type_name: "喜剧"},
|
||||
{type_id: "kehuan", type_name: "科幻"},
|
||||
{type_id: "kongbu", type_name: "恐怖"},
|
||||
{type_id: "zhanzheng", type_name: "战争"},
|
||||
{type_id: "wuxia", type_name: "武侠"},
|
||||
{type_id: "mohuan", type_name: "魔幻"},
|
||||
{type_id: "juqing", type_name: "剧情"},
|
||||
{type_id: "donghua", type_name: "动画"},
|
||||
{type_id: "jingsong", type_name: "惊悚"},
|
||||
{type_id: "3D", type_name: "3D"},
|
||||
{type_id: "zainan", type_name: "灾难"},
|
||||
{type_id: "xuanyi", type_name: "悬疑"},
|
||||
{type_id: "jingfei", type_name: "警匪"},
|
||||
{type_id: "wenyi", type_name: "文艺"},
|
||||
{type_id: "qingchun", type_name: "青春"},
|
||||
{type_id: "maoxian", type_name: "冒险"},
|
||||
{type_id: "fanzui", type_name: "犯罪"},
|
||||
{type_id: "jilu", type_name: "纪录"},
|
||||
{type_id: "guzhuang", type_name: "古装"},
|
||||
{type_id: "qihuan", type_name: "奇幻"},
|
||||
{type_id: "guoyu", type_name: "国语"},
|
||||
{type_id: "zongyi", type_name: "综艺"},
|
||||
{type_id: "lishi", type_name: "历史"},
|
||||
{type_id: "yundong", type_name: "运动"},
|
||||
{type_id: "yuanchuang", type_name: "原创压制"},
|
||||
{type_id: "meiju", type_name: "美剧"},
|
||||
{type_id: "hanju", type_name: "韩剧"},
|
||||
{type_id: "guoju", type_name: "国产电视剧"},
|
||||
{type_id: "riju", type_name: "日剧"},
|
||||
{type_id: "yingju", type_name: "英剧"},
|
||||
{type_id: "deju", type_name: "德剧"},
|
||||
{type_id: "eju", type_name: "俄剧"},
|
||||
{type_id: "baju", type_name: "巴剧"},
|
||||
{type_id: "jiaju", type_name: "加剧"},
|
||||
{type_id: "spanish", type_name: "西剧"},
|
||||
{type_id: "yidaliju", type_name: "意大利剧"},
|
||||
{type_id: "taiju", type_name: "泰剧"},
|
||||
{type_id: "gangtaiju", type_name: "港台剧"},
|
||||
{type_id: "faju", type_name: "法剧"},
|
||||
{type_id: "aoju", type_name: "澳剧"},
|
||||
{type_id: "duanju", type_name: "短剧"}
|
||||
],
|
||||
filters: {}
|
||||
};
|
||||
|
||||
const commonFilters = [
|
||||
{key: "type", name: "资源分类", value: [{n: "全部", v: ""}, {n: "电影", v: "0"}, {n: "电视剧", v: "1"}]},
|
||||
{key: "area", name: "制片地区", value: [{n: "全部", v: ""}, {n: "中国大陆", v: "中国大陆"}, {n: "中国香港", v: "中国香港"}, {n: "中国台湾", v: "中国台湾"}, {n: "美国", v: "美国"}, {n: "英国", v: "英国"}, {n: "日本", v: "日本"}, {n: "韩国", v: "韩国"}, {n: "法国", v: "法国"}, {n: "印度", v: "印度"}, {n: "德国", v: "德国"}, {n: "西班牙", v: "西班牙"}, {n: "意大利", v: "意大利"}, {n: "澳大利亚", v: "澳大利亚"}, {n: "比利时", v: "比利时"}, {n: "瑞典", v: "瑞典"}, {n: "荷兰", v: "荷兰"}, {n: "丹麦", v: "丹麦"}, {n: "加拿大", v: "加拿大"}, {n: "俄罗斯", v: "俄罗斯"}]},
|
||||
{key: "year", name: "上映时间", value: [{n: "全部", v: ""}, {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: "2008", v: "2008"}, {n: "2007", v: "2007"}, {n: "2006", v: "2006"}, {n: "2005", v: "2005"}, {n: "2004", v: "2004"}, {n: "2003", v: "2003"}, {n: "2002", v: "2002"}]},
|
||||
{key: "order", name: "影视排序", value: [{n: "默认", v: ""}, {n: "更新时间", v: "0"}, {n: "豆瓣评分", v: "1"}]}
|
||||
];
|
||||
|
||||
filterConfig.class.forEach(item => {
|
||||
filterConfig.filters[item.type_id] = commonFilters;
|
||||
});
|
||||
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(`${baseUrl}`); // 使用模板字符串
|
||||
const videos = parseVideoList(document);
|
||||
return { list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
|
||||
// https://www.xlys02.com/s/aiqing?type=1&area=地区&year=2025&order=0
|
||||
await Java.wvOpen(`${baseUrl}/s/${tid}/${pg}?[type=${extend?.type}]&[area=${extend?.area}]&[year=${extend?.year}]&[order=${extend?.order}]`);
|
||||
const videos = parseVideoList(document);
|
||||
|
||||
const pagecount = parseInt(Array.from(document.querySelectorAll('a.page-link')).find(el => el.textContent.includes('尾页'))?.href?.match(/\/(\d+)\?/)?.[1] || "1");
|
||||
return { code: 1, msg: "数据列表", page: pg, pagecount: 10000, limit: videos.length, total: videos.length * 10000, list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
// Java.showWebView();
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
const list = parseDetailPage(document);
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list };
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
let res = await Java.req(`${baseUrl}/search/${key}----------${pg}---.html`);
|
||||
const videos = parseVideoList(res.doc);
|
||||
let pages = [1, 1];
|
||||
let total = videos.length;
|
||||
try {
|
||||
const getPages = res.doc.querySelector("ul > li.active.num").outerText;
|
||||
pages = getPages.split('/');
|
||||
total = parseInt(pages[1]) * 12;
|
||||
} catch (e) {}
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total };
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 1 };
|
||||
}
|
||||
|
||||
/**
|
||||
* action
|
||||
*/
|
||||
async function action(actionStr) {
|
||||
try {
|
||||
const params = JSON.parse(actionStr);
|
||||
console.log("action params:", params);
|
||||
} catch (e) {
|
||||
console.log("action is not JSON, treat as string");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList() {
|
||||
const vods = [];
|
||||
document.querySelectorAll('.row-cards .card-sm').forEach(item => {
|
||||
const link = item.querySelector('a.cover');
|
||||
const img = item.querySelector('img');
|
||||
const badge = item.querySelector('.badge');
|
||||
const date = item.querySelector('.text-muted');
|
||||
vods.push({
|
||||
vod_id: link?.getAttribute('href') || '',
|
||||
vod_name: item.querySelector('.card-title')?.textContent?.trim() || '',
|
||||
vod_pic: img?.getAttribute('data-src') || img?.getAttribute('src') || '',
|
||||
vod_remarks: badge?.textContent?.trim() || '',
|
||||
vod_year: date?.textContent?.trim() || ''
|
||||
});
|
||||
});
|
||||
return vods;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(document) {
|
||||
const title = document.querySelector('.stui-content__detail .title')?.textContent.trim() || '';
|
||||
const vod_pic = document.querySelector('.stui-content__thumb img')?.src || '';
|
||||
const info = document.querySelectorAll('.stui-content__detail .data');
|
||||
|
||||
const typeMatch = info[0]?.textContent.match(/类型:([^/]+)\s*\/\s*地区:([^/]+)\s*\/\s*年份:(\d+)/) || [];
|
||||
const type_name = typeMatch[1] || '', vod_area = typeMatch[2] || '', vod_year = typeMatch[3] || '';
|
||||
const vod_actor = info[1]?.textContent.replace('主演:', '').trim() || '';
|
||||
const vod_director = info[2]?.textContent.replace('导演:', '').trim() || '';
|
||||
const vod_remarks = info[3]?.textContent.replace('更新:', '').trim() || '';
|
||||
const vod_content = document.querySelector('.detail-content')?.textContent.trim() ||
|
||||
document.querySelector('.detail-sketch')?.textContent.trim() || '';
|
||||
|
||||
// 播放线路
|
||||
const head = document.querySelector('.stui-vodlist__head h3');
|
||||
const ul = document.querySelector('.stui-content__playlist');
|
||||
const episodes = ul ? Array.from(ul.querySelectorAll('a')).map(a =>
|
||||
`${a.textContent.trim()}$${baseUrl + a.getAttribute('href')}`) : [];
|
||||
const vod_play_from = head ? head.textContent.trim().replace('在线播放', '线路') : '';
|
||||
const vod_play_url = episodes.join('#');
|
||||
|
||||
return [{
|
||||
vod_id: window.location.pathname.replace(/[^\w]/g, '_'),
|
||||
vod_name: title,
|
||||
vod_pic: vod_pic,
|
||||
vod_remarks: vod_remarks,
|
||||
vod_year: vod_year,
|
||||
vod_actor: vod_actor,
|
||||
vod_director: vod_director,
|
||||
vod_area: vod_area,
|
||||
vod_lang: vod_area.includes('大陆') ? '国语' : '其他',
|
||||
vod_content: vod_content,
|
||||
vod_play_from: vod_play_from,
|
||||
vod_play_url: vod_play_url
|
||||
}];
|
||||
}
|
||||
|
||||
+261
@@ -0,0 +1,261 @@
|
||||
/**
|
||||
* 剧圈圈在线(www.jqqzx.top)爬虫
|
||||
* 版本:3.0 - WvSpider v2.0 新架构
|
||||
* 最后更新:2025-12-23
|
||||
* 发布页 https://www.jqqzx.vip
|
||||
*
|
||||
* @config
|
||||
* debug: true
|
||||
// * showWebView: true
|
||||
* percent: 80,60
|
||||
* returnType: dom
|
||||
* timeout: 30
|
||||
* keywords: 系统安全验证|系统提示|人机验证
|
||||
* blockImages: true
|
||||
* blockList: *.[ico|png|jpeg|jpg|gif|webp]*|*.css
|
||||
*
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://www.jqqzx.top';
|
||||
|
||||
/**
|
||||
* 初始化方法
|
||||
*/
|
||||
function init(cfg) {
|
||||
console.log('初始化被调用')
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "dianying", type_name: "电影" },
|
||||
{ type_id: "juji", type_name: "剧集" },
|
||||
{ type_id: "dongman", type_name: "动漫" },
|
||||
{ type_id: "zongyi", type_name: "综艺" },
|
||||
{ type_id: "duanju", type_name: "短剧" }
|
||||
],
|
||||
filters: {
|
||||
"dianying": [
|
||||
{ key: "type", name: "类型", value: [ {n:"全部",v:""}, {n:"动作片",v:"dongzuopian"}, {n:"喜剧片",v:"xijupian"}, {n:"爱情片",v:"aiqingpian"}, {n:"科幻片",v:"kehuanpian"}, {n:"恐怖片",v:"kongbupian"}, {n:"剧情片",v:"juqingpian"}, {n:"战争片",v:"zhanzhengpian"}, {n:"动画片",v:"donghuapian"} ] },
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {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: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"日本",v:"日本"}, {n:"泰国",v:"泰国"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"新加坡",v:"新加坡"}, {n:"马来西亚",v:"马来西亚"}, {n:"印度",v:"印度"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"德国",v:"德国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1999",v:"1999"}, {n:"1998",v:"1998"}, {n:"1997",v:"1997"}, {n:"1996",v:"1996"}, {n:"1995",v:"1995"}, {n:"1994",v:"1994"}, {n:"1993",v:"1993"}, {n:"1992",v:"1992"}, {n:"1991",v:"1991"}, {n:"1990",v:"1990"}, {n:"1989",v:"1989"}, {n:"1988",v:"1988"}, {n:"1987",v:"1987"}, {n:"1986",v:"1986"}, {n:"1985",v:"1985"}, {n:"1984",v:"1984"}, {n:"1983",v:"1983"}, {n:"1982",v:"1982"}, {n:"1981",v:"1981"}, {n:"1980",v:"1980"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"juji": [
|
||||
{ key: "type", name: "类型", value: [ {n:"全部",v:""}, {n:"国产剧",v:"guochanju"}, {n:"港台剧",v:"gangtaiju"}, {n:"日韩剧",v:"rihanju"}, {n:"欧美剧",v:"oumeiju"}, {n:"泰国剧",v:"taiguoju"} ] },
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {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: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"日本",v:"日本"}, {n:"泰国",v:"泰国"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"新加坡",v:"新加坡"}, {n:"马来西亚",v:"马来西亚"}, {n:"印度",v:"印度"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"德国",v:"德国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1999",v:"1999"}, {n:"1998",v:"1998"}, {n:"1997",v:"1997"}, {n:"1996",v:"1996"}, {n:"1995",v:"1995"}, {n:"1994",v:"1994"}, {n:"1993",v:"1993"}, {n:"1992",v:"1992"}, {n:"1991",v:"1991"}, {n:"1990",v:"1990"}, {n:"1989",v:"1989"}, {n:"1988",v:"1988"}, {n:"1987",v:"1987"}, {n:"1986",v:"1986"}, {n:"1985",v:"1985"}, {n:"1984",v:"1984"}, {n:"1983",v:"1983"}, {n:"1982",v:"1982"}, {n:"1981",v:"1981"}, {n:"1980",v:"1980"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"zongyi": [
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {n:"纪录片",v:"纪录片"}, {n:"真人秀",v:"真人秀"}, {n:"音乐",v:"音乐"}, {n:"喜剧",v:"喜剧"}, {n:"脱口秀",v:"脱口秀"}, {n:"文化",v:"文化"}, {n:"美食",v:"美食"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"日本",v:"日本"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"印度",v:"印度"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"德国",v:"德国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "lang", name: "语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1990",v:"1990"}, {n:"1980",v:"1980"}, {n:"1970",v:"1970"}, {n:"1960",v:"1960"}, {n:"1950",v:"1950"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"dongman": [
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"奇幻",v:"奇幻"}, {n:"动作",v:"动作"}, {n:"科幻",v:"科幻"}, {n:"喜剧",v:"喜剧"}, {n:"冒险",v:"冒险"}, {n:"后宫",v:"后宫"}, {n:"爱情",v:"爱情"}, {n:"悬疑",v:"悬疑"}, {n:"机战",v:"机战"}, {n:"战争",v:"战争"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1999",v:"1999"}, {n:"1998",v:"1998"}, {n:"1997",v:"1997"}, {n:"1996",v:"1996"}, {n:"1995",v:"1995"}, {n:"1994",v:"1994"}, {n:"1993",v:"1993"}, {n:"1992",v:"1992"}, {n:"1991",v:"1991"}, {n:"1990",v:"1990"}, {n:"1989",v:"1989"}, {n:"1988",v:"1988"}, {n:"1987",v:"1987"}, {n:"1986",v:"1986"}, {n:"1985",v:"1985"}, {n:"1984",v:"1984"}, {n:"1983",v:"1983"}, {n:"1982",v:"1982"}, {n:"1981",v:"1981"}, {n:"1980",v:"1980"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"duanju": [
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"都市",v:"都市"}, {n:"古装",v:"古装"}, {n:"穿越",v:"穿越"}, {n:"重生",v:"重生"}, {n:"逆袭",v:"逆袭"}, {n:"赘婿",v:"赘婿"}, {n:"战神",v:"战神"}, {n:"神医",v:"神医"}, {n:"甜宠",v:"甜宠"}, {n:"虐恋",v:"虐恋"}, {n:"言情",v:"言情"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(baseUrl);
|
||||
return { list: parseVideoList() };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类列表
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
console.log(`分类: tid=${tid}, pg=${pg}`);
|
||||
const document = await Java.wvOpen(`${baseUrl}/vodshow[/area/${extend?.area}][/by/${extend?.sort}][/class/${extend?.cate}]/id/${extend?.type||tid}[/year/${extend?.year}]/page/${pg||1}.html`);
|
||||
|
||||
const pagecount = parseInt(document.querySelector('#page a[title="尾页"]')?.href?.match(/page\/(\d+)/)?.[1] || '1');
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: parseVideoList(),
|
||||
page: parseInt(pg) || 1,
|
||||
pagecount: pagecount,
|
||||
limit: 40,
|
||||
total: pagecount * 40
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
console.log('获取到的id', ids);
|
||||
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: parseDetailPage(),
|
||||
page: 1,
|
||||
pagecount: 1,
|
||||
limit: 1,
|
||||
total: 1
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
const searchUrl = `${baseUrl}/vodsearch${key}/page/${pg || 1}.html`;
|
||||
|
||||
// 检查是否有验证码需要校验
|
||||
const captcha = Java.getSearchCode();
|
||||
if (captcha && captcha.success) {
|
||||
console.log('获取到的cookie:', captcha.cookie);
|
||||
const verifyRes = await Java.req(`${baseUrl}/index.php/ajax/verify_check?type=search&verify=${captcha.code}`, {
|
||||
headers: { "Cookie": captcha.cookie }
|
||||
});
|
||||
console.log('验证码校验结果:', verifyRes.body);
|
||||
}
|
||||
|
||||
// 发起搜索请求
|
||||
const res = await Java.req(searchUrl, {
|
||||
headers: captcha?.cookie ? { "Cookie": captcha.cookie } : {}
|
||||
});
|
||||
|
||||
// 检测是否需要验证码
|
||||
if (!res?.doc?.title?.includes("搜索结果")) {
|
||||
// 需要验证码,返回验证码请求
|
||||
return {
|
||||
SearchCode: true, // 标记需要验证码
|
||||
site: '剧圈圈', // 验证码站点标题
|
||||
autoOcr: true, // 是否自动识别验证码
|
||||
url: `${baseUrl}/index.php/verify/index.html?${Date.now()}`
|
||||
};
|
||||
}
|
||||
|
||||
const vods = [];
|
||||
res?.doc?.querySelectorAll('.module-card-item').forEach(item => {
|
||||
const link = item.querySelector('.module-card-item-title a');
|
||||
const img = item.querySelector('.module-item-pic img');
|
||||
const desc = item.querySelector('.module-info-item-content');
|
||||
vods.push({
|
||||
vod_id: link?.getAttribute('href') || '',
|
||||
vod_name: link?.textContent?.trim() || '',
|
||||
vod_pic: img?.getAttribute('data-original') || img?.getAttribute('src') || '',
|
||||
vod_remarks: desc?.textContent?.trim() || ''
|
||||
});
|
||||
});
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: vods,
|
||||
page: pg,
|
||||
pagecount: parseInt(res?.doc?.querySelector("#page > a:nth-child(9)")?.href?.match(/page\/(\d+)/)?.[1] || '1'),
|
||||
limit: 16,
|
||||
total: parseInt(res?.doc?.querySelector("strong.mac_total")?.textContent || '0')
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
console.log("播放内容:", flag, id);
|
||||
return {
|
||||
type: 'sniff',
|
||||
url: id,
|
||||
keyword: '.m3u8|.mp4',
|
||||
script: `let t=setInterval(()=>{let s=document.querySelector('iframe[src*="player.php"]')?.contentDocument?.querySelector('#start');if(s){s.click();clearInterval(t)}},100);`,
|
||||
timeout: 15
|
||||
};
|
||||
}
|
||||
|
||||
async function action(action) {
|
||||
console.log("收到的动作:", action);
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList() {
|
||||
const vods = [];
|
||||
document.querySelectorAll('a.module-poster-item').forEach(item => {
|
||||
vods.push({
|
||||
vod_id: baseUrl + (item.getAttribute('href') || ''),
|
||||
vod_name: item.getAttribute('title') || '',
|
||||
vod_pic: item.querySelector('img')?.getAttribute('data-original') || '',
|
||||
vod_remarks: item.querySelector('.module-item-note')?.textContent?.trim() || ''
|
||||
});
|
||||
});
|
||||
return vods;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage() {
|
||||
// 辅助函数
|
||||
const text = s => document.querySelector(s)?.textContent?.trim() || '';
|
||||
const attr = (s, a) => document.querySelector(s)?.getAttribute(a) || '';
|
||||
const findInfo = label => [...document.querySelectorAll('.module-info-item')].find(el => el.textContent.includes(label));
|
||||
|
||||
// 解析播放列表
|
||||
const playUrls = [];
|
||||
document.querySelectorAll('.his-tab-list').forEach(list => {
|
||||
const eps = [...list.querySelectorAll('.module-play-list-link')].map(link => {
|
||||
const name = link.querySelector('span')?.textContent?.trim();
|
||||
const url = baseUrl + link.getAttribute('href');
|
||||
return name && url ? `${name}$${url}` : null;
|
||||
}).filter(Boolean);
|
||||
if (eps.length) playUrls.push(eps.join('#'));
|
||||
});
|
||||
|
||||
// 获取线路名称
|
||||
const playFrom = [...document.querySelectorAll('.module-tab-item span')]
|
||||
.map(s => s.textContent.trim())
|
||||
.filter(Boolean)
|
||||
.join('$$$');
|
||||
|
||||
return [{
|
||||
vod_id: location.href,
|
||||
vod_name: text('.module-info-heading h1'),
|
||||
vod_pic: attr('.module-item-pic img', 'data-original'),
|
||||
vod_remarks: findInfo('集数')?.querySelector('.module-info-item-content')?.textContent?.trim() || '',
|
||||
vod_year: attr('.module-info-tag-link a[title*="202"]', 'title'),
|
||||
vod_director: findInfo('导演')
|
||||
? [...findInfo('导演').querySelectorAll('a')].map(a => a.textContent.trim()).join('/')
|
||||
: '',
|
||||
vod_actor: findInfo('主演')
|
||||
? [...findInfo('主演').querySelectorAll('a')].map(a => a.textContent.trim()).join('/')
|
||||
: '',
|
||||
vod_content: text('.module-info-introduction-content p'),
|
||||
vod_play_from: playFrom,
|
||||
vod_play_url: playUrls.join('$$$')
|
||||
}];
|
||||
}
|
||||
+259
@@ -0,0 +1,259 @@
|
||||
/**
|
||||
* 剧多多 爬虫
|
||||
* 版本:3.0 - WvSpider v2.0 新架构
|
||||
* 最后更新:2025-12-23
|
||||
* 发布页 https://www.jddzx.vip/
|
||||
*
|
||||
* @config
|
||||
* debug: true
|
||||
// * showWebView: true
|
||||
* percent: 80,60
|
||||
* returnType: dom
|
||||
* timeout: 30
|
||||
* keywords: 系统安全验证|系统提示......|人机验证
|
||||
* blockImages: true
|
||||
* blockList: *.[ico|png|jpeg|jpg|gif|webp]*|*.css
|
||||
*
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://www.jddzx.cc';
|
||||
|
||||
/**
|
||||
* 初始化方法
|
||||
*/
|
||||
function init(cfg) {
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "dianying", type_name: "电影" },
|
||||
{ type_id: "juji", type_name: "剧集" },
|
||||
{ type_id: "dongman", type_name: "动漫" },
|
||||
{ type_id: "zongyi", type_name: "综艺" },
|
||||
{ type_id: "duanju", type_name: "短剧" }
|
||||
],
|
||||
filters: {
|
||||
"dianying": [
|
||||
{ key: "type", name: "类型", value: [ {n:"全部",v:""}, {n:"动作片",v:"dongzuopian"}, {n:"喜剧片",v:"xijupian"}, {n:"爱情片",v:"aiqingpian"}, {n:"科幻片",v:"kehuanpian"}, {n:"恐怖片",v:"kongbupian"}, {n:"剧情片",v:"juqingpian"}, {n:"战争片",v:"zhanzhengpian"}, {n:"动画片",v:"donghuapian"} ] },
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {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: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"日本",v:"日本"}, {n:"泰国",v:"泰国"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"新加坡",v:"新加坡"}, {n:"马来西亚",v:"马来西亚"}, {n:"印度",v:"印度"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"德国",v:"德国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1999",v:"1999"}, {n:"1998",v:"1998"}, {n:"1997",v:"1997"}, {n:"1996",v:"1996"}, {n:"1995",v:"1995"}, {n:"1994",v:"1994"}, {n:"1993",v:"1993"}, {n:"1992",v:"1992"}, {n:"1991",v:"1991"}, {n:"1990",v:"1990"}, {n:"1989",v:"1989"}, {n:"1988",v:"1988"}, {n:"1987",v:"1987"}, {n:"1986",v:"1986"}, {n:"1985",v:"1985"}, {n:"1984",v:"1984"}, {n:"1983",v:"1983"}, {n:"1982",v:"1982"}, {n:"1981",v:"1981"}, {n:"1980",v:"1980"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"juji": [
|
||||
{ key: "type", name: "类型", value: [ {n:"全部",v:""}, {n:"国产剧",v:"guochanju"}, {n:"港台剧",v:"gangtaiju"}, {n:"日韩剧",v:"rihanju"}, {n:"欧美剧",v:"oumeiju"}, {n:"泰国剧",v:"taiguoju"} ] },
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {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: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"日本",v:"日本"}, {n:"泰国",v:"泰国"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"新加坡",v:"新加坡"}, {n:"马来西亚",v:"马来西亚"}, {n:"印度",v:"印度"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"德国",v:"德国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1999",v:"1999"}, {n:"1998",v:"1998"}, {n:"1997",v:"1997"}, {n:"1996",v:"1996"}, {n:"1995",v:"1995"}, {n:"1994",v:"1994"}, {n:"1993",v:"1993"}, {n:"1992",v:"1992"}, {n:"1991",v:"1991"}, {n:"1990",v:"1990"}, {n:"1989",v:"1989"}, {n:"1988",v:"1988"}, {n:"1987",v:"1987"}, {n:"1986",v:"1986"}, {n:"1985",v:"1985"}, {n:"1984",v:"1984"}, {n:"1983",v:"1983"}, {n:"1982",v:"1982"}, {n:"1981",v:"1981"}, {n:"1980",v:"1980"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"zongyi": [
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {n:"纪录片",v:"纪录片"}, {n:"真人秀",v:"真人秀"}, {n:"音乐",v:"音乐"}, {n:"喜剧",v:"喜剧"}, {n:"脱口秀",v:"脱口秀"}, {n:"文化",v:"文化"}, {n:"美食",v:"美食"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"日本",v:"日本"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"印度",v:"印度"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"德国",v:"德国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "lang", name: "语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1990",v:"1990"}, {n:"1980",v:"1980"}, {n:"1970",v:"1970"}, {n:"1960",v:"1960"}, {n:"1950",v:"1950"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"dongman": [
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"奇幻",v:"奇幻"}, {n:"动作",v:"动作"}, {n:"科幻",v:"科幻"}, {n:"喜剧",v:"喜剧"}, {n:"冒险",v:"冒险"}, {n:"后宫",v:"后宫"}, {n:"爱情",v:"爱情"}, {n:"悬疑",v:"悬疑"}, {n:"机战",v:"机战"}, {n:"战争",v:"战争"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1999",v:"1999"}, {n:"1998",v:"1998"}, {n:"1997",v:"1997"}, {n:"1996",v:"1996"}, {n:"1995",v:"1995"}, {n:"1994",v:"1994"}, {n:"1993",v:"1993"}, {n:"1992",v:"1992"}, {n:"1991",v:"1991"}, {n:"1990",v:"1990"}, {n:"1989",v:"1989"}, {n:"1988",v:"1988"}, {n:"1987",v:"1987"}, {n:"1986",v:"1986"}, {n:"1985",v:"1985"}, {n:"1984",v:"1984"}, {n:"1983",v:"1983"}, {n:"1982",v:"1982"}, {n:"1981",v:"1981"}, {n:"1980",v:"1980"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"duanju": [
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"都市",v:"都市"}, {n:"古装",v:"古装"}, {n:"穿越",v:"穿越"}, {n:"重生",v:"重生"}, {n:"逆袭",v:"逆袭"}, {n:"赘婿",v:"赘婿"}, {n:"战神",v:"战神"}, {n:"神医",v:"神医"}, {n:"甜宠",v:"甜宠"}, {n:"虐恋",v:"虐恋"}, {n:"言情",v:"言情"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(baseUrl);
|
||||
return { list: parseVideoList() };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类列表
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
console.log(`分类: tid=${tid}, pg=${pg}`);
|
||||
const document = await Java.wvOpen(`${baseUrl}/vodshow[/area/${extend?.area}][/by/${extend?.sort}][/class/${extend?.cate}]/id/${extend?.type||tid}[/year/${extend?.year}]/page/${pg||1}.html`);
|
||||
|
||||
const pagecount = parseInt(document.querySelector('#page a[title="尾页"]')?.href?.match(/page\/(\d+)/)?.[1] || '1');
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: parseVideoList(),
|
||||
page: parseInt(pg) || 1,
|
||||
pagecount: pagecount,
|
||||
limit: 40,
|
||||
total: pagecount * 40
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
console.log('获取到的id', ids);
|
||||
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: parseDetailPage(),
|
||||
page: 1,
|
||||
pagecount: 1,
|
||||
limit: 1,
|
||||
total: 1
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
const searchUrl = `${baseUrl}/vodsearch${key}/page/${pg || 1}.html`;
|
||||
|
||||
// 检查是否有验证码需要校验
|
||||
const captcha = Java.getSearchCode();
|
||||
if (captcha && captcha.success) {
|
||||
console.log('使用验证码校验:', captcha.code);
|
||||
console.log('获取到的cookie:', captcha.cookie);
|
||||
const verifyRes = await Java.req(`${baseUrl}/index.php/ajax/verify_check?type=search&verify=${captcha.code}`, {
|
||||
headers: { "Cookie": captcha.cookie }
|
||||
});
|
||||
console.log('验证码校验结果:', verifyRes.body);
|
||||
}
|
||||
|
||||
// 发起搜索请求
|
||||
const res = await Java.req(searchUrl, {
|
||||
headers: captcha?.cookie ? { "Cookie": captcha.cookie } : {}
|
||||
});
|
||||
|
||||
// 检测是否需要验证码
|
||||
if (!res?.doc?.title?.includes("搜索结果")) {
|
||||
// 需要验证码,返回验证码请求
|
||||
return {
|
||||
SearchCode: true, // 标记需要验证码
|
||||
site: '剧多多', // 验证码站点标题
|
||||
autoOcr: true, // 是否自动识别验证码
|
||||
url: `${baseUrl}/index.php/verify/index.html?${Date.now()}`
|
||||
};
|
||||
}
|
||||
|
||||
const vods = [];
|
||||
res?.doc?.querySelectorAll('.module-card-item').forEach(item => {
|
||||
const link = item.querySelector('.module-card-item-title a');
|
||||
const img = item.querySelector('.module-item-pic img');
|
||||
const desc = item.querySelector('.module-info-item-content');
|
||||
vods.push({
|
||||
vod_id: link?.getAttribute('href') || '',
|
||||
vod_name: link?.textContent?.trim() || '',
|
||||
vod_pic: img?.getAttribute('data-original') || img?.getAttribute('src') || '',
|
||||
vod_remarks: desc?.textContent?.trim() || ''
|
||||
});
|
||||
});
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: vods,
|
||||
page: pg,
|
||||
pagecount: parseInt(res?.doc?.querySelector("#page > a:nth-child(9)")?.href?.match(/page\/(\d+)/)?.[1] || '1'),
|
||||
limit: 16,
|
||||
total: parseInt(res?.doc?.querySelector("strong.mac_total")?.textContent || '0')
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
console.log("播放内容:", flag, id);
|
||||
return {
|
||||
type: 'sniff',
|
||||
url: id,
|
||||
keyword: '.m3u8|.mp4',
|
||||
script: `let t=setInterval(()=>{let s=document.querySelector('iframe[src*="player.php"]')?.contentDocument?.querySelector('#start');if(s){s.click();clearInterval(t)}},100);`,
|
||||
timeout: 15
|
||||
};
|
||||
}
|
||||
|
||||
async function action(action) {
|
||||
console.log("收到的动作:", action);
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList() {
|
||||
const vods = [];
|
||||
document.querySelectorAll('a.module-poster-item').forEach(item => {
|
||||
vods.push({
|
||||
vod_id: baseUrl + (item.getAttribute('href') || ''),
|
||||
vod_name: item.getAttribute('title') || '',
|
||||
vod_pic: item.querySelector('img')?.getAttribute('data-original') || '',
|
||||
vod_remarks: item.querySelector('.module-item-note')?.textContent?.trim() || ''
|
||||
});
|
||||
});
|
||||
return vods;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage() {
|
||||
// 辅助函数
|
||||
const text = s => document.querySelector(s)?.textContent?.trim() || '';
|
||||
const attr = (s, a) => document.querySelector(s)?.getAttribute(a) || '';
|
||||
const findInfo = label => [...document.querySelectorAll('.module-info-item')].find(el => el.textContent.includes(label));
|
||||
|
||||
// 解析播放列表
|
||||
const playUrls = [];
|
||||
document.querySelectorAll('.his-tab-list').forEach(list => { // 修正:使用 querySelectorAll
|
||||
const eps = [...list.querySelectorAll('.module-play-list-link')].map(link => {
|
||||
const name = link.querySelector('span')?.textContent?.trim();
|
||||
const url = baseUrl + link.getAttribute('href');
|
||||
return name && url ? `${name}$${url}` : null;
|
||||
}).filter(Boolean);
|
||||
if (eps.length) playUrls.push(eps.join('#'));
|
||||
});
|
||||
|
||||
// 获取线路名称
|
||||
const playFrom = [...document.querySelectorAll('.module-tab-item span')]
|
||||
.map(s => s.textContent.trim())
|
||||
.filter(Boolean)
|
||||
.join('$$$');
|
||||
|
||||
return [{
|
||||
vod_id: location.href,
|
||||
vod_name: text('.module-info-heading h1'),
|
||||
vod_pic: attr('.module-item-pic img', 'data-original'),
|
||||
vod_remarks: findInfo('集数')?.querySelector('.module-info-item-content')?.textContent?.trim() || '',
|
||||
vod_year: attr('.module-info-tag-link a[title*="202"]', 'title'),
|
||||
vod_director: findInfo('导演')
|
||||
? [...findInfo('导演').querySelectorAll('a')].map(a => a.textContent.trim()).join('/')
|
||||
: '',
|
||||
vod_actor: findInfo('主演')
|
||||
? [...findInfo('主演').querySelectorAll('a')].map(a => a.textContent.trim()).join('/')
|
||||
: '',
|
||||
vod_content: text('.module-info-introduction-content p'),
|
||||
vod_play_from: playFrom,
|
||||
vod_play_url: playUrls.join('$$$')
|
||||
}];
|
||||
}
|
||||
@@ -0,0 +1,238 @@
|
||||
/**
|
||||
* 厂长资源 爬虫
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2025-12-17
|
||||
* 发布页 https://cz01.vip/
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://www.czzymovie.com/';
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*/
|
||||
async function init(cfg) {
|
||||
return {
|
||||
webview: {
|
||||
debug: true,
|
||||
showWebView: true,
|
||||
widthPercent: 80,
|
||||
heightPercent: 60,
|
||||
keyword: '',
|
||||
returnType: 'dom',
|
||||
timeout: 30,
|
||||
blockImages: true,
|
||||
enableJavaScript: true,
|
||||
header: { 'Referer': baseUrl },
|
||||
blockList: [
|
||||
"*.ico*",
|
||||
"*.png*",
|
||||
"*.jpg*",
|
||||
"*.jpeg*",
|
||||
"*.gif*",
|
||||
"*.webp*",
|
||||
"*.css*"
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "1", type_name: "电影" },
|
||||
{ type_id: "2", type_name: "电视剧" },
|
||||
{ type_id: "4", type_name: "动漫" }
|
||||
],
|
||||
filters: {
|
||||
"1": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"动作片",v:"dongzuopian"}, {n:"剧情片",v:"juqingpian"}, {n:"冒险片",v:"maoxianpian"}, {n:"惊悚片",v:"jingsongpian"}, {n:"喜剧片",v:"xijupian"}, {n:"爱情片",v:"aiqingpian"}, {n:"科幻片",v:"kehuanpian"}, {n:"战争片",v:"zhanzhengpian"}, {n:"警匪片",v:"jingfeipian"}, {n:"犯罪片",v:"fanzuipian"}, {n:"恐怖片",v:"kongbupian"}, {n:"悬疑片",v:"xuanyipian"}, {n:"灾难片",v:"zainanpian"}, {n:"奇幻片",v:"qihuanpian"}, {n:"动画片",v:"donghuapian"}, {n:"其他片",v:"qitapian"} ] },
|
||||
{ key: "class", 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:"网络电影"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"法国",v:"法国"}, {n:"英国",v:"英国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"}, {n:"德国",v:"德国"}, {n:"泰国",v:"泰国"}, {n:"印度",v:"印度"}, {n:"意大利",v:"意大利"}, {n:"西班牙",v:"西班牙"}, {n:"加拿大",v:"加拿大"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"法语",v:"法语"}, {n:"德语",v:"德语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"2": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"国产剧",v:"guochanju"}, {n:"港台剧",v:"gangtaiju"}, {n:"日韩剧",v:"rihanju"}, {n:"欧美剧",v:"oumeiju"}, {n:"泰国剧",v:"taiguoju"}, {n:"其他剧",v:"qitaju"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"内地",v:"内地"}, {n:"韩国",v:"韩国"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"泰国",v:"泰国"}, {n:"英国",v:"英国"}, {n:"新加坡",v:"新加坡"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"4": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"日韩动漫",v:"rihandongman"}, {n:"国产动漫",v:"guochandongman"}, {n:"欧美动漫",v:"oumeidongman"}, {n:"港台动漫",v:"gangtaidongman"}, {n:"其他动漫",v:"qitadongman"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"国产",v:"国产"}, {n:"日本",v:"日本"}, {n:"欧美",v:"欧美"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(baseUrl + '/');
|
||||
const videos = parseVideoList(document);
|
||||
return { list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
|
||||
const area = extend.area || '';
|
||||
const year = extend.year || '';
|
||||
const cat = extend.class || '';
|
||||
const sort = extend.sort || '';
|
||||
const type = extend.type || tid;
|
||||
const lang = extend.lang || '';
|
||||
|
||||
// console.log("筛选参数:", extend, `type=${type}, area=${area}, year=${year}, cat=${cat}, sort=${sort}, lang=${lang}`);
|
||||
// const document = await Java.wvOpen(`${baseUrl}/list/${type||tid}-${area}-${sort}-${cat}-${lang}----${pg}---${year}.html`);
|
||||
const document = await Java.wvOpen(`${baseUrl}/show/${tid}-${area}-${sort}-${type}-${lang}-${letter}---${pg}---${year}.html`);
|
||||
const videos = parseVideoList(document);
|
||||
const getPages = document.querySelector("ul > li.active.num").outerText;
|
||||
const pages = getPages.split('/');
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total: pages[1] * 12 };
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
// Java.showWebView();
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
const list = parseDetailPage(document);
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list };
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
let res = await Java.req(`${baseUrl}/search/${key}----------${pg}---.html`);
|
||||
const videos = parseVideoList(res.doc);
|
||||
let pages = [1, 1];
|
||||
let total = videos.length;
|
||||
try {
|
||||
const getPages = res.doc.querySelector("ul > li.active.num").outerText;
|
||||
pages = getPages.split('/');
|
||||
total = parseInt(pages[1]) * 12;
|
||||
} catch (e) {}
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total };
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 1 };
|
||||
}
|
||||
|
||||
/**
|
||||
* action
|
||||
*/
|
||||
async function action(actionStr) {
|
||||
try {
|
||||
const params = JSON.parse(actionStr);
|
||||
console.log("action params:", params);
|
||||
} catch (e) {
|
||||
console.log("action is not JSON, treat as string");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList(document) {
|
||||
const boxes = Array.from(document.querySelectorAll('.stui-vodlist__box'));
|
||||
const list = boxes.map(box => {
|
||||
const titleEl = box.querySelector('.title a');
|
||||
const thumbEl = box.querySelector('.stui-vodlist__thumb');
|
||||
const remarksEl = box.querySelector('.pic-text');
|
||||
|
||||
// 处理 vod_id
|
||||
let vodId = titleEl?.getAttribute('href') || '';
|
||||
if (vodId && !vodId.startsWith('http')) {
|
||||
vodId = baseUrl + (vodId.startsWith('/') ? '' : '/') + vodId;
|
||||
}
|
||||
|
||||
return {
|
||||
vod_name: titleEl?.title || titleEl?.textContent || '',
|
||||
vod_pic: thumbEl?.getAttribute('data-original') ||
|
||||
thumbEl?.style.backgroundImage?.match(/url\(["']?([^"')]+)["']?\)/)?.[1] || '',
|
||||
vod_remarks: remarksEl?.textContent || '',
|
||||
vod_id: vodId,
|
||||
vod_actor: (() => {
|
||||
const textEl = box.querySelector('.text');
|
||||
const comment = textEl?.previousSibling;
|
||||
return comment?.nodeType === 8 ? comment.textContent.trim() : '';
|
||||
})()
|
||||
};
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(document) {
|
||||
const title = document.querySelector('.stui-content__detail .title')?.textContent.trim() || '';
|
||||
const vod_pic = document.querySelector('.stui-content__thumb img')?.src || '';
|
||||
const info = document.querySelectorAll('.stui-content__detail .data');
|
||||
|
||||
const typeMatch = info[0]?.textContent.match(/类型:([^/]+)\s*\/\s*地区:([^/]+)\s*\/\s*年份:(\d+)/) || [];
|
||||
const type_name = typeMatch[1] || '', vod_area = typeMatch[2] || '', vod_year = typeMatch[3] || '';
|
||||
const vod_actor = info[1]?.textContent.replace('主演:', '').trim() || '';
|
||||
const vod_director = info[2]?.textContent.replace('导演:', '').trim() || '';
|
||||
const vod_remarks = info[3]?.textContent.replace('更新:', '').trim() || '';
|
||||
const vod_content = document.querySelector('.detail-content')?.textContent.trim() ||
|
||||
document.querySelector('.detail-sketch')?.textContent.trim() || '';
|
||||
|
||||
// 播放线路
|
||||
const head = document.querySelector('.stui-vodlist__head h3');
|
||||
const ul = document.querySelector('.stui-content__playlist');
|
||||
const episodes = ul ? Array.from(ul.querySelectorAll('a')).map(a =>
|
||||
`${a.textContent.trim()}$${baseUrl + a.getAttribute('href')}`) : [];
|
||||
const vod_play_from = head ? head.textContent.trim().replace('在线播放', '线路') : '';
|
||||
const vod_play_url = episodes.join('#');
|
||||
|
||||
return [{
|
||||
vod_id: window.location.pathname.replace(/[^\w]/g, '_'),
|
||||
vod_name: title,
|
||||
vod_pic: vod_pic,
|
||||
vod_remarks: vod_remarks,
|
||||
vod_year: vod_year,
|
||||
vod_actor: vod_actor,
|
||||
vod_director: vod_director,
|
||||
vod_area: vod_area,
|
||||
vod_lang: vod_area.includes('大陆') ? '国语' : '其他',
|
||||
vod_content: vod_content,
|
||||
vod_play_from: vod_play_from,
|
||||
vod_play_url: vod_play_url
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 导出对象 ---------------- */
|
||||
const spider = { init, homeContent, homeVideoContent, categoryContent, detailContent, searchContent, playerContent, action };
|
||||
spider;
|
||||
@@ -0,0 +1,238 @@
|
||||
/**
|
||||
* 嘀嗒影视 爬虫
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2025-12-17
|
||||
* 发布页 https://www.didahd.pro/
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://www.didahd.pro/';
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*/
|
||||
async function init(cfg) {
|
||||
return {
|
||||
webview: {
|
||||
debug: true,
|
||||
showWebView: true,
|
||||
widthPercent: 80,
|
||||
heightPercent: 60,
|
||||
keyword: '',
|
||||
returnType: 'dom',
|
||||
timeout: 30,
|
||||
blockImages: true,
|
||||
enableJavaScript: true,
|
||||
header: { 'Referer': baseUrl },
|
||||
blockList: [
|
||||
"*.ico*",
|
||||
"*.png*",
|
||||
"*.jpg*",
|
||||
"*.jpeg*",
|
||||
"*.gif*",
|
||||
"*.webp*",
|
||||
"*.css*"
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "1", type_name: "电影" },
|
||||
{ type_id: "2", type_name: "电视剧" },
|
||||
{ type_id: "4", type_name: "动漫" }
|
||||
],
|
||||
filters: {
|
||||
"1": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"动作片",v:"dongzuopian"}, {n:"剧情片",v:"juqingpian"}, {n:"冒险片",v:"maoxianpian"}, {n:"惊悚片",v:"jingsongpian"}, {n:"喜剧片",v:"xijupian"}, {n:"爱情片",v:"aiqingpian"}, {n:"科幻片",v:"kehuanpian"}, {n:"战争片",v:"zhanzhengpian"}, {n:"警匪片",v:"jingfeipian"}, {n:"犯罪片",v:"fanzuipian"}, {n:"恐怖片",v:"kongbupian"}, {n:"悬疑片",v:"xuanyipian"}, {n:"灾难片",v:"zainanpian"}, {n:"奇幻片",v:"qihuanpian"}, {n:"动画片",v:"donghuapian"}, {n:"其他片",v:"qitapian"} ] },
|
||||
{ key: "class", 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:"网络电影"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"法国",v:"法国"}, {n:"英国",v:"英国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"}, {n:"德国",v:"德国"}, {n:"泰国",v:"泰国"}, {n:"印度",v:"印度"}, {n:"意大利",v:"意大利"}, {n:"西班牙",v:"西班牙"}, {n:"加拿大",v:"加拿大"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"法语",v:"法语"}, {n:"德语",v:"德语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"2": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"国产剧",v:"guochanju"}, {n:"港台剧",v:"gangtaiju"}, {n:"日韩剧",v:"rihanju"}, {n:"欧美剧",v:"oumeiju"}, {n:"泰国剧",v:"taiguoju"}, {n:"其他剧",v:"qitaju"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"内地",v:"内地"}, {n:"韩国",v:"韩国"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"泰国",v:"泰国"}, {n:"英国",v:"英国"}, {n:"新加坡",v:"新加坡"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"4": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"日韩动漫",v:"rihandongman"}, {n:"国产动漫",v:"guochandongman"}, {n:"欧美动漫",v:"oumeidongman"}, {n:"港台动漫",v:"gangtaidongman"}, {n:"其他动漫",v:"qitadongman"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"国产",v:"国产"}, {n:"日本",v:"日本"}, {n:"欧美",v:"欧美"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(baseUrl + '/');
|
||||
const videos = parseVideoList(document);
|
||||
return { list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
|
||||
const area = extend.area || '';
|
||||
const year = extend.year || '';
|
||||
const cat = extend.class || '';
|
||||
const sort = extend.sort || '';
|
||||
const type = extend.type || tid;
|
||||
const lang = extend.lang || '';
|
||||
|
||||
// console.log("筛选参数:", extend, `type=${type}, area=${area}, year=${year}, cat=${cat}, sort=${sort}, lang=${lang}`);
|
||||
// const document = await Java.wvOpen(`${baseUrl}/list/${type||tid}-${area}-${sort}-${cat}-${lang}----${pg}---${year}.html`);
|
||||
const document = await Java.wvOpen(`${baseUrl}/show/${tid}-${area}-${sort}-${type}-${lang}-${letter}---${pg}---${year}.html`);
|
||||
const videos = parseVideoList(document);
|
||||
const getPages = document.querySelector("ul > li.active.num").outerText;
|
||||
const pages = getPages.split('/');
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total: pages[1] * 12 };
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
// Java.showWebView();
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
const list = parseDetailPage(document);
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list };
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
let res = await Java.req(`${baseUrl}/search/${key}----------${pg}---.html`);
|
||||
const videos = parseVideoList(res.doc);
|
||||
let pages = [1, 1];
|
||||
let total = videos.length;
|
||||
try {
|
||||
const getPages = res.doc.querySelector("ul > li.active.num").outerText;
|
||||
pages = getPages.split('/');
|
||||
total = parseInt(pages[1]) * 12;
|
||||
} catch (e) {}
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total };
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 1 };
|
||||
}
|
||||
|
||||
/**
|
||||
* action
|
||||
*/
|
||||
async function action(actionStr) {
|
||||
try {
|
||||
const params = JSON.parse(actionStr);
|
||||
console.log("action params:", params);
|
||||
} catch (e) {
|
||||
console.log("action is not JSON, treat as string");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList(document) {
|
||||
const boxes = Array.from(document.querySelectorAll('.stui-vodlist__box'));
|
||||
const list = boxes.map(box => {
|
||||
const titleEl = box.querySelector('.title a');
|
||||
const thumbEl = box.querySelector('.stui-vodlist__thumb');
|
||||
const remarksEl = box.querySelector('.pic-text');
|
||||
|
||||
// 处理 vod_id
|
||||
let vodId = titleEl?.getAttribute('href') || '';
|
||||
if (vodId && !vodId.startsWith('http')) {
|
||||
vodId = baseUrl + (vodId.startsWith('/') ? '' : '/') + vodId;
|
||||
}
|
||||
|
||||
return {
|
||||
vod_name: titleEl?.title || titleEl?.textContent || '',
|
||||
vod_pic: thumbEl?.getAttribute('data-original') ||
|
||||
thumbEl?.style.backgroundImage?.match(/url\(["']?([^"')]+)["']?\)/)?.[1] || '',
|
||||
vod_remarks: remarksEl?.textContent || '',
|
||||
vod_id: vodId,
|
||||
vod_actor: (() => {
|
||||
const textEl = box.querySelector('.text');
|
||||
const comment = textEl?.previousSibling;
|
||||
return comment?.nodeType === 8 ? comment.textContent.trim() : '';
|
||||
})()
|
||||
};
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(document) {
|
||||
const title = document.querySelector('.stui-content__detail .title')?.textContent.trim() || '';
|
||||
const vod_pic = document.querySelector('.stui-content__thumb img')?.src || '';
|
||||
const info = document.querySelectorAll('.stui-content__detail .data');
|
||||
|
||||
const typeMatch = info[0]?.textContent.match(/类型:([^/]+)\s*\/\s*地区:([^/]+)\s*\/\s*年份:(\d+)/) || [];
|
||||
const type_name = typeMatch[1] || '', vod_area = typeMatch[2] || '', vod_year = typeMatch[3] || '';
|
||||
const vod_actor = info[1]?.textContent.replace('主演:', '').trim() || '';
|
||||
const vod_director = info[2]?.textContent.replace('导演:', '').trim() || '';
|
||||
const vod_remarks = info[3]?.textContent.replace('更新:', '').trim() || '';
|
||||
const vod_content = document.querySelector('.detail-content')?.textContent.trim() ||
|
||||
document.querySelector('.detail-sketch')?.textContent.trim() || '';
|
||||
|
||||
// 播放线路
|
||||
const head = document.querySelector('.stui-vodlist__head h3');
|
||||
const ul = document.querySelector('.stui-content__playlist');
|
||||
const episodes = ul ? Array.from(ul.querySelectorAll('a')).map(a =>
|
||||
`${a.textContent.trim()}$${baseUrl + a.getAttribute('href')}`) : [];
|
||||
const vod_play_from = head ? head.textContent.trim().replace('在线播放', '线路') : '';
|
||||
const vod_play_url = episodes.join('#');
|
||||
|
||||
return [{
|
||||
vod_id: window.location.pathname.replace(/[^\w]/g, '_'),
|
||||
vod_name: title,
|
||||
vod_pic: vod_pic,
|
||||
vod_remarks: vod_remarks,
|
||||
vod_year: vod_year,
|
||||
vod_actor: vod_actor,
|
||||
vod_director: vod_director,
|
||||
vod_area: vod_area,
|
||||
vod_lang: vod_area.includes('大陆') ? '国语' : '其他',
|
||||
vod_content: vod_content,
|
||||
vod_play_from: vod_play_from,
|
||||
vod_play_url: vod_play_url
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 导出对象 ---------------- */
|
||||
const spider = { init, homeContent, homeVideoContent, categoryContent, detailContent, searchContent, playerContent, action };
|
||||
spider;
|
||||
+159
@@ -0,0 +1,159 @@
|
||||
/**
|
||||
* 央视频 720P
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2026-1-2 02:46:31
|
||||
* 发布页 https://m.yangshipin.cn/
|
||||
* @config
|
||||
* debug: true
|
||||
* blockList: *.[ico|png|jpeg|jpg|gif|webp]*|*.css
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://m.yangshipin.cn/';
|
||||
const headers = {
|
||||
'user-agent': 'Mozilla/5.0 (Linux; Android 12; HarmonyOS; ELS-AN10; HMSCore 6.11.0.302) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.88 HuaweiBrowser/13.0.3.320 Mobile Safari/537.36'
|
||||
};
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*/
|
||||
async function init(cfg) {
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
return {
|
||||
class: [
|
||||
{ type_id: "1", type_name: "央视" },
|
||||
{ type_id: "2", type_name: "卫视" }
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
return { list: [] };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
const res = await Java.req('https://h5access.yangshipin.cn/web/tv_web_share?raw=1&pid=600002485');
|
||||
const jsonData = JSON.parse(res.body);
|
||||
const pidInfo = jsonData?.data?.pidInfo || [];
|
||||
|
||||
const isCentralTV = (name) => name.startsWith('CCTV') || name.startsWith('CGTN');
|
||||
|
||||
const vods = pidInfo
|
||||
.filter(item => {
|
||||
if (item.vipInfo?.isVip !== false) return false;
|
||||
if (!item.pid || !item.channelName) return false;
|
||||
const isCentral = isCentralTV(item.channelName);
|
||||
return tid === '1' ? isCentral : !isCentral;
|
||||
})
|
||||
.map(item => {
|
||||
const isCentral = isCentralTV(item.channelName);
|
||||
const vodPic = item.audioPosterUrl;
|
||||
return {
|
||||
vod_id: item.pid,
|
||||
vod_name: item.channelName,
|
||||
vod_pic: vodPic,
|
||||
style: { type: "rect", ratio: isCentral ? 1.66 : 1 }
|
||||
};
|
||||
})
|
||||
.filter(item => item.vod_pic);
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: vods,
|
||||
page: 1,
|
||||
pagecount: 1,
|
||||
limit: vods.length,
|
||||
total: vods.length
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
const res = await Java.req(`https://h5access.yangshipin.cn/web/h5_live_poll?raw=1&pid=${ids[0]}&reqType=2`);
|
||||
const jsonData = JSON.parse(res.body);
|
||||
const epgs = jsonData?.data?.h5TVLivePollRsp?.tvLivePollRsp?.programs || [];
|
||||
const currentTime = jsonData?.data?.h5TVLivePollRsp?.tvLivePollRsp?.currentServerTime || 0;
|
||||
|
||||
const dayStart = Math.floor(currentTime / 86400) * 86400;
|
||||
let liveName = '';
|
||||
let replayList = [];
|
||||
|
||||
epgs.forEach(item => {
|
||||
const endTime = item.start_time_stamp + item.duration;
|
||||
if (currentTime >= item.start_time_stamp && currentTime <= endTime) {
|
||||
liveName = item.name;
|
||||
}
|
||||
if (item.start_time_stamp >= dayStart && item.start_time_stamp < currentTime) {
|
||||
let epg_time = formatTime(item.start_time_stamp, 'MM-DD HH:mm');
|
||||
replayList.push(`[${epg_time}]${item.name}$${ids[0]}_${item.start_time_stamp}_${item.id}`);
|
||||
}
|
||||
});
|
||||
|
||||
const list = [{
|
||||
vod_id: ids[0],
|
||||
vod_name: jsonData?.data?.h5TVLivePollRsp?.tvLivePollRsp?.title,
|
||||
vod_content: jsonData?.data?.h5TVLivePollRsp?.tvLivePollRsp?.title + `【${liveName}】正在直播中 `,
|
||||
vod_play_from: '正在直播$$$节目回看',
|
||||
vod_play_url: `${liveName}$${ids[0]}$$$${replayList.join('#')}`
|
||||
}];
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list };
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
return { list: [] };
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
// Java.showWebView();
|
||||
let playUrl = `https://m.yangshipin.cn/tv?pid=${id}&ptag=4_1.0.5.15187_copy,4_1.0.0.20034_copy`;
|
||||
if (flag == '节目回看') {
|
||||
const ids = id.split("_");
|
||||
const res = await Java.req(`https://h5access.yangshipin.cn/web/h5_share?vappid=&vsecret=b42702bf7309a179d102f3d51b1add2fda0bc7ada64cb801&raw=1&shareToType=1&shareId=itemtype%3Dcommon%26shareType%3Dtv%26pid%3D${ids[0]}%26startTime%3D${ids[1]}%26programID%3D${ids[2]}&shareFrom=h5`);
|
||||
const jsonData = JSON.parse(res.body);
|
||||
playUrl = jsonData.data.shareUrl;
|
||||
}
|
||||
return {
|
||||
type: 'sniff',
|
||||
url: playUrl,
|
||||
headers: headers,
|
||||
script: `let t=setInterval(()=>{let p=document.querySelector("#v-live-video");if(p?.play){p.play();clearInterval(t)}},100);`,
|
||||
timeout: 15
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function formatTime(timestamp, format = 'YYYY-MM-DD HH:mm:ss') {
|
||||
const date = new Date(timestamp * 1000);
|
||||
const map = {
|
||||
'YYYY': date.getFullYear(),
|
||||
'MM': String(date.getMonth() + 1).padStart(2, '0'),
|
||||
'DD': String(date.getDate()).padStart(2, '0'),
|
||||
'HH': String(date.getHours()).padStart(2, '0'),
|
||||
'mm': String(date.getMinutes()).padStart(2, '0'),
|
||||
'ss': String(date.getSeconds()).padStart(2, '0')
|
||||
};
|
||||
|
||||
return format.replace(/YYYY|MM|DD|HH|mm|ss/g, matched => map[matched]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
/**
|
||||
* 子子影视 爬虫
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2025-12-17
|
||||
* 发布页 https://ziziys.info/
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://www.rebozj.pro';
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*/
|
||||
async function init(cfg) {
|
||||
return {
|
||||
webview: {
|
||||
debug: true,
|
||||
showWebView: true,
|
||||
widthPercent: 80,
|
||||
heightPercent: 60,
|
||||
keyword: '',
|
||||
returnType: 'dom',
|
||||
timeout: 30,
|
||||
blockImages: true,
|
||||
enableJavaScript: true,
|
||||
header: { 'Referer': baseUrl },
|
||||
blockList: [
|
||||
"*.ico*",
|
||||
"*.png*",
|
||||
"*.jpg*",
|
||||
"*.jpeg*",
|
||||
"*.gif*",
|
||||
"*.webp*",
|
||||
"*.css*"
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "1", type_name: "电影" },
|
||||
{ type_id: "2", type_name: "电视剧" },
|
||||
{ type_id: "4", type_name: "动漫" }
|
||||
],
|
||||
filters: {
|
||||
"1": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"动作片",v:"dongzuopian"}, {n:"剧情片",v:"juqingpian"}, {n:"冒险片",v:"maoxianpian"}, {n:"惊悚片",v:"jingsongpian"}, {n:"喜剧片",v:"xijupian"}, {n:"爱情片",v:"aiqingpian"}, {n:"科幻片",v:"kehuanpian"}, {n:"战争片",v:"zhanzhengpian"}, {n:"警匪片",v:"jingfeipian"}, {n:"犯罪片",v:"fanzuipian"}, {n:"恐怖片",v:"kongbupian"}, {n:"悬疑片",v:"xuanyipian"}, {n:"灾难片",v:"zainanpian"}, {n:"奇幻片",v:"qihuanpian"}, {n:"动画片",v:"donghuapian"}, {n:"其他片",v:"qitapian"} ] },
|
||||
{ key: "class", 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:"网络电影"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"法国",v:"法国"}, {n:"英国",v:"英国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"}, {n:"德国",v:"德国"}, {n:"泰国",v:"泰国"}, {n:"印度",v:"印度"}, {n:"意大利",v:"意大利"}, {n:"西班牙",v:"西班牙"}, {n:"加拿大",v:"加拿大"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"法语",v:"法语"}, {n:"德语",v:"德语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"2": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"国产剧",v:"guochanju"}, {n:"港台剧",v:"gangtaiju"}, {n:"日韩剧",v:"rihanju"}, {n:"欧美剧",v:"oumeiju"}, {n:"泰国剧",v:"taiguoju"}, {n:"其他剧",v:"qitaju"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"内地",v:"内地"}, {n:"韩国",v:"韩国"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"泰国",v:"泰国"}, {n:"英国",v:"英国"}, {n:"新加坡",v:"新加坡"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"4": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"日韩动漫",v:"rihandongman"}, {n:"国产动漫",v:"guochandongman"}, {n:"欧美动漫",v:"oumeidongman"}, {n:"港台动漫",v:"gangtaidongman"}, {n:"其他动漫",v:"qitadongman"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"国产",v:"国产"}, {n:"日本",v:"日本"}, {n:"欧美",v:"欧美"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(baseUrl + '/');
|
||||
const videos = parseVideoList(document);
|
||||
return { list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
|
||||
const area = extend.area || '';
|
||||
const year = extend.year || '';
|
||||
const cat = extend.class || '';
|
||||
const sort = extend.sort || '';
|
||||
const type = extend.type || tid;
|
||||
const lang = extend.lang || '';
|
||||
|
||||
// console.log("筛选参数:", extend, `type=${type}, area=${area}, year=${year}, cat=${cat}, sort=${sort}, lang=${lang}`);
|
||||
// const document = await Java.wvOpen(`${baseUrl}/list/${type||tid}-${area}-${sort}-${cat}-${lang}----${pg}---${year}.html`);
|
||||
const document = await Java.wvOpen(`${baseUrl}/show/${tid}-${area}-${sort}-${type}-${lang}-${letter}---${pg}---${year}.html`);
|
||||
const videos = parseVideoList(document);
|
||||
const getPages = document.querySelector("ul > li.active.num").outerText;
|
||||
const pages = getPages.split('/');
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total: pages[1] * 12 };
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
// Java.showWebView();
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
const list = parseDetailPage(document);
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list };
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
let res = await Java.req(`${baseUrl}/search/${key}----------${pg}---.html`);
|
||||
const videos = parseVideoList(res.doc);
|
||||
let pages = [1, 1];
|
||||
let total = videos.length;
|
||||
try {
|
||||
const getPages = res.doc.querySelector("ul > li.active.num").outerText;
|
||||
pages = getPages.split('/');
|
||||
total = parseInt(pages[1]) * 12;
|
||||
} catch (e) {}
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total };
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 1 };
|
||||
}
|
||||
|
||||
/**
|
||||
* action
|
||||
*/
|
||||
async function action(actionStr) {
|
||||
try {
|
||||
const params = JSON.parse(actionStr);
|
||||
console.log("action params:", params);
|
||||
} catch (e) {
|
||||
console.log("action is not JSON, treat as string");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList(document) {
|
||||
const boxes = Array.from(document.querySelectorAll('.stui-vodlist__box'));
|
||||
const list = boxes.map(box => {
|
||||
const titleEl = box.querySelector('.title a');
|
||||
const thumbEl = box.querySelector('.stui-vodlist__thumb');
|
||||
const remarksEl = box.querySelector('.pic-text');
|
||||
|
||||
// 处理 vod_id
|
||||
let vodId = titleEl?.getAttribute('href') || '';
|
||||
if (vodId && !vodId.startsWith('http')) {
|
||||
vodId = baseUrl + (vodId.startsWith('/') ? '' : '/') + vodId;
|
||||
}
|
||||
|
||||
return {
|
||||
vod_name: titleEl?.title || titleEl?.textContent || '',
|
||||
vod_pic: thumbEl?.getAttribute('data-original') ||
|
||||
thumbEl?.style.backgroundImage?.match(/url\(["']?([^"')]+)["']?\)/)?.[1] || '',
|
||||
vod_remarks: remarksEl?.textContent || '',
|
||||
vod_id: vodId,
|
||||
vod_actor: (() => {
|
||||
const textEl = box.querySelector('.text');
|
||||
const comment = textEl?.previousSibling;
|
||||
return comment?.nodeType === 8 ? comment.textContent.trim() : '';
|
||||
})()
|
||||
};
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(document) {
|
||||
const title = document.querySelector('.stui-content__detail .title')?.textContent.trim() || '';
|
||||
const vod_pic = document.querySelector('.stui-content__thumb img')?.src || '';
|
||||
const info = document.querySelectorAll('.stui-content__detail .data');
|
||||
|
||||
const typeMatch = info[0]?.textContent.match(/类型:([^/]+)\s*\/\s*地区:([^/]+)\s*\/\s*年份:(\d+)/) || [];
|
||||
const type_name = typeMatch[1] || '', vod_area = typeMatch[2] || '', vod_year = typeMatch[3] || '';
|
||||
const vod_actor = info[1]?.textContent.replace('主演:', '').trim() || '';
|
||||
const vod_director = info[2]?.textContent.replace('导演:', '').trim() || '';
|
||||
const vod_remarks = info[3]?.textContent.replace('更新:', '').trim() || '';
|
||||
const vod_content = document.querySelector('.detail-content')?.textContent.trim() ||
|
||||
document.querySelector('.detail-sketch')?.textContent.trim() || '';
|
||||
|
||||
// 播放线路
|
||||
const head = document.querySelector('.stui-vodlist__head h3');
|
||||
const ul = document.querySelector('.stui-content__playlist');
|
||||
const episodes = ul ? Array.from(ul.querySelectorAll('a')).map(a =>
|
||||
`${a.textContent.trim()}$${baseUrl + a.getAttribute('href')}`) : [];
|
||||
const vod_play_from = head ? head.textContent.trim().replace('在线播放', '线路') : '';
|
||||
const vod_play_url = episodes.join('#');
|
||||
|
||||
return [{
|
||||
vod_id: window.location.pathname.replace(/[^\w]/g, '_'),
|
||||
vod_name: title,
|
||||
vod_pic: vod_pic,
|
||||
vod_remarks: vod_remarks,
|
||||
vod_year: vod_year,
|
||||
vod_actor: vod_actor,
|
||||
vod_director: vod_director,
|
||||
vod_area: vod_area,
|
||||
vod_lang: vod_area.includes('大陆') ? '国语' : '其他',
|
||||
vod_content: vod_content,
|
||||
vod_play_from: vod_play_from,
|
||||
vod_play_url: vod_play_url
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 导出对象 ---------------- */
|
||||
const spider = { init, homeContent, homeVideoContent, categoryContent, detailContent, searchContent, playerContent, action };
|
||||
spider;
|
||||
+238
@@ -0,0 +1,238 @@
|
||||
/**
|
||||
* 快点播 爬虫
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2025-12-17
|
||||
* 发布页 https://www.quickvod.vip/
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://www.quickvod.fun/';
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*/
|
||||
async function init(cfg) {
|
||||
return {
|
||||
webview: {
|
||||
debug: true,
|
||||
showWebView: true,
|
||||
widthPercent: 80,
|
||||
heightPercent: 60,
|
||||
keyword: '',
|
||||
returnType: 'dom',
|
||||
timeout: 30,
|
||||
blockImages: true,
|
||||
enableJavaScript: true,
|
||||
header: { 'Referer': baseUrl },
|
||||
blockList: [
|
||||
"*.ico*",
|
||||
"*.png*",
|
||||
"*.jpg*",
|
||||
"*.jpeg*",
|
||||
"*.gif*",
|
||||
"*.webp*",
|
||||
"*.css*"
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "1", type_name: "电影" },
|
||||
{ type_id: "2", type_name: "电视剧" },
|
||||
{ type_id: "4", type_name: "动漫" }
|
||||
],
|
||||
filters: {
|
||||
"1": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"动作片",v:"dongzuopian"}, {n:"剧情片",v:"juqingpian"}, {n:"冒险片",v:"maoxianpian"}, {n:"惊悚片",v:"jingsongpian"}, {n:"喜剧片",v:"xijupian"}, {n:"爱情片",v:"aiqingpian"}, {n:"科幻片",v:"kehuanpian"}, {n:"战争片",v:"zhanzhengpian"}, {n:"警匪片",v:"jingfeipian"}, {n:"犯罪片",v:"fanzuipian"}, {n:"恐怖片",v:"kongbupian"}, {n:"悬疑片",v:"xuanyipian"}, {n:"灾难片",v:"zainanpian"}, {n:"奇幻片",v:"qihuanpian"}, {n:"动画片",v:"donghuapian"}, {n:"其他片",v:"qitapian"} ] },
|
||||
{ key: "class", 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:"网络电影"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"法国",v:"法国"}, {n:"英国",v:"英国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"}, {n:"德国",v:"德国"}, {n:"泰国",v:"泰国"}, {n:"印度",v:"印度"}, {n:"意大利",v:"意大利"}, {n:"西班牙",v:"西班牙"}, {n:"加拿大",v:"加拿大"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"法语",v:"法语"}, {n:"德语",v:"德语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"2": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"国产剧",v:"guochanju"}, {n:"港台剧",v:"gangtaiju"}, {n:"日韩剧",v:"rihanju"}, {n:"欧美剧",v:"oumeiju"}, {n:"泰国剧",v:"taiguoju"}, {n:"其他剧",v:"qitaju"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"内地",v:"内地"}, {n:"韩国",v:"韩国"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"泰国",v:"泰国"}, {n:"英国",v:"英国"}, {n:"新加坡",v:"新加坡"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"4": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"日韩动漫",v:"rihandongman"}, {n:"国产动漫",v:"guochandongman"}, {n:"欧美动漫",v:"oumeidongman"}, {n:"港台动漫",v:"gangtaidongman"}, {n:"其他动漫",v:"qitadongman"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"国产",v:"国产"}, {n:"日本",v:"日本"}, {n:"欧美",v:"欧美"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(baseUrl + '/');
|
||||
const videos = parseVideoList(document);
|
||||
return { list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
|
||||
const area = extend.area || '';
|
||||
const year = extend.year || '';
|
||||
const cat = extend.class || '';
|
||||
const sort = extend.sort || '';
|
||||
const type = extend.type || tid;
|
||||
const lang = extend.lang || '';
|
||||
|
||||
// console.log("筛选参数:", extend, `type=${type}, area=${area}, year=${year}, cat=${cat}, sort=${sort}, lang=${lang}`);
|
||||
// const document = await Java.wvOpen(`${baseUrl}/list/${type||tid}-${area}-${sort}-${cat}-${lang}----${pg}---${year}.html`);
|
||||
const document = await Java.wvOpen(`${baseUrl}/show/${tid}-${area}-${sort}-${type}-${lang}-${letter}---${pg}---${year}.html`);
|
||||
const videos = parseVideoList(document);
|
||||
const getPages = document.querySelector("ul > li.active.num").outerText;
|
||||
const pages = getPages.split('/');
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total: pages[1] * 12 };
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
// Java.showWebView();
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
const list = parseDetailPage(document);
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list };
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
let res = await Java.req(`${baseUrl}/search/${key}----------${pg}---.html`);
|
||||
const videos = parseVideoList(res.doc);
|
||||
let pages = [1, 1];
|
||||
let total = videos.length;
|
||||
try {
|
||||
const getPages = res.doc.querySelector("ul > li.active.num").outerText;
|
||||
pages = getPages.split('/');
|
||||
total = parseInt(pages[1]) * 12;
|
||||
} catch (e) {}
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total };
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 1 };
|
||||
}
|
||||
|
||||
/**
|
||||
* action
|
||||
*/
|
||||
async function action(actionStr) {
|
||||
try {
|
||||
const params = JSON.parse(actionStr);
|
||||
console.log("action params:", params);
|
||||
} catch (e) {
|
||||
console.log("action is not JSON, treat as string");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList(document) {
|
||||
const boxes = Array.from(document.querySelectorAll('.stui-vodlist__box'));
|
||||
const list = boxes.map(box => {
|
||||
const titleEl = box.querySelector('.title a');
|
||||
const thumbEl = box.querySelector('.stui-vodlist__thumb');
|
||||
const remarksEl = box.querySelector('.pic-text');
|
||||
|
||||
// 处理 vod_id
|
||||
let vodId = titleEl?.getAttribute('href') || '';
|
||||
if (vodId && !vodId.startsWith('http')) {
|
||||
vodId = baseUrl + (vodId.startsWith('/') ? '' : '/') + vodId;
|
||||
}
|
||||
|
||||
return {
|
||||
vod_name: titleEl?.title || titleEl?.textContent || '',
|
||||
vod_pic: thumbEl?.getAttribute('data-original') ||
|
||||
thumbEl?.style.backgroundImage?.match(/url\(["']?([^"')]+)["']?\)/)?.[1] || '',
|
||||
vod_remarks: remarksEl?.textContent || '',
|
||||
vod_id: vodId,
|
||||
vod_actor: (() => {
|
||||
const textEl = box.querySelector('.text');
|
||||
const comment = textEl?.previousSibling;
|
||||
return comment?.nodeType === 8 ? comment.textContent.trim() : '';
|
||||
})()
|
||||
};
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(document) {
|
||||
const title = document.querySelector('.stui-content__detail .title')?.textContent.trim() || '';
|
||||
const vod_pic = document.querySelector('.stui-content__thumb img')?.src || '';
|
||||
const info = document.querySelectorAll('.stui-content__detail .data');
|
||||
|
||||
const typeMatch = info[0]?.textContent.match(/类型:([^/]+)\s*\/\s*地区:([^/]+)\s*\/\s*年份:(\d+)/) || [];
|
||||
const type_name = typeMatch[1] || '', vod_area = typeMatch[2] || '', vod_year = typeMatch[3] || '';
|
||||
const vod_actor = info[1]?.textContent.replace('主演:', '').trim() || '';
|
||||
const vod_director = info[2]?.textContent.replace('导演:', '').trim() || '';
|
||||
const vod_remarks = info[3]?.textContent.replace('更新:', '').trim() || '';
|
||||
const vod_content = document.querySelector('.detail-content')?.textContent.trim() ||
|
||||
document.querySelector('.detail-sketch')?.textContent.trim() || '';
|
||||
|
||||
// 播放线路
|
||||
const head = document.querySelector('.stui-vodlist__head h3');
|
||||
const ul = document.querySelector('.stui-content__playlist');
|
||||
const episodes = ul ? Array.from(ul.querySelectorAll('a')).map(a =>
|
||||
`${a.textContent.trim()}$${baseUrl + a.getAttribute('href')}`) : [];
|
||||
const vod_play_from = head ? head.textContent.trim().replace('在线播放', '线路') : '';
|
||||
const vod_play_url = episodes.join('#');
|
||||
|
||||
return [{
|
||||
vod_id: window.location.pathname.replace(/[^\w]/g, '_'),
|
||||
vod_name: title,
|
||||
vod_pic: vod_pic,
|
||||
vod_remarks: vod_remarks,
|
||||
vod_year: vod_year,
|
||||
vod_actor: vod_actor,
|
||||
vod_director: vod_director,
|
||||
vod_area: vod_area,
|
||||
vod_lang: vod_area.includes('大陆') ? '国语' : '其他',
|
||||
vod_content: vod_content,
|
||||
vod_play_from: vod_play_from,
|
||||
vod_play_url: vod_play_url
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 导出对象 ---------------- */
|
||||
const spider = { init, homeContent, homeVideoContent, categoryContent, detailContent, searchContent, playerContent, action };
|
||||
spider;
|
||||
@@ -0,0 +1,215 @@
|
||||
/**
|
||||
* 新韩剧网(hanju7.com)爬虫
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2025-12-19
|
||||
* 发布页 https://www.hanju7.com/
|
||||
*
|
||||
* @config
|
||||
* debug: true
|
||||
// * showWebView: true
|
||||
* percent: 80,60
|
||||
* returnType: dom
|
||||
* timeout: 30
|
||||
* blockImages: true
|
||||
* blockList: *.[ico|png|jpeg|jpg|gif|webp]*,.css
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://www.hanju7.com';
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*/
|
||||
async function init(cfg) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "1", type_name: "韩剧" },
|
||||
{ type_id: "3", type_name: "韩国电影" },
|
||||
{ type_id: "4", type_name: "韩国综艺" },
|
||||
{ type_id: "hot", type_name: "排行榜" },
|
||||
{ type_id: "new", type_name: "最新更新" }
|
||||
],
|
||||
filters: {
|
||||
"1": [
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"10后",v:"2010__2019"}, {n:"00后",v:"2000__2009"}, {n:"90后",v:"1990__1999"}, {n:"80后",v:"1980__1989"}, {n:"更早",v:"1900__1980"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"最新",v:"newstime"}, {n:"热门",v:"onclick"} ] }
|
||||
],
|
||||
"3": [
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"10后",v:"2010__2019"}, {n:"00后",v:"2000__2009"}, {n:"90后",v:"1990__1999"}, {n:"80后",v:"1980__1989"}, {n:"更早",v:"1900__1980"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"最新",v:"newstime"}, {n:"热门",v:"onclick"} ] }
|
||||
],
|
||||
"4": [
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"10后",v:"2010__2019"}, {n:"00后",v:"2000__2009"}, {n:"90后",v:"1990__1999"}, {n:"80后",v:"1980__1989"}, {n:"更早",v:"1900__1980"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"最新",v:"newstime"}, {n:"热门",v:"onclick"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(`${baseUrl}/`); // 使用模板字符串
|
||||
const videos = parseVideoList(document);
|
||||
return { list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
// console.log("筛选参数:", extend, `type=${type}, area=${area}, year=${year}, cat=${cat}, sort=${sort}, lang=${lang}`);
|
||||
const year = extend.year || '';
|
||||
const sort = extend.sort || '';
|
||||
Java.wvOpen(`${baseUrl}/list/${tid}-${year}-${sort}-${pg}.html`).when('tid=hot|new', `${baseUrl}/${tid}.html`);
|
||||
|
||||
if (tid === 'hot' || tid === 'new') {
|
||||
// 排行榜或最新更新
|
||||
// const document = await Java.req(`${baseUrl}/${tid}.html`);
|
||||
let i = 1;
|
||||
const videos = Array.from(document.querySelectorAll('#t ~ li')).map(li => ({
|
||||
vod_id: baseUrl + li.querySelector('a[href^="/detail/"]').getAttribute('href'),
|
||||
vod_name: li.querySelector('a').textContent,
|
||||
vod_year: li.querySelector('#time').textContent,
|
||||
vod_pic: 'https://dummyimage.com/240x240/ffffff/ffc800.png&text=' + (i++), // 搞个占位图
|
||||
vod_remarks: li.querySelector('#time').textContent + ' | ' + li.querySelector('#actor').textContent,
|
||||
style: {
|
||||
type : 'list'
|
||||
}
|
||||
}));
|
||||
|
||||
// console.log("视频列表:", { code: 1, msg: "数据列表", list: videos, page: 1, pagecount: 1, limit: 100, total: 100 } );
|
||||
|
||||
return { code: 1, msg: "数据列表", list: videos, page: 1, pagecount: 1, limit: 100, total: 100 };
|
||||
} else {
|
||||
// 普通分类
|
||||
// https://www.hanju7.com/list/1-2024-onclick-1.html
|
||||
// const document = await Java.wvOpen(`${baseUrl}/list/${tid}-${year}-${sort}-${pg}.html`);
|
||||
const videos = parseVideoList(document);
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pg, pagecount: 10000, limit: 24, total: 240000 };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
const getText = (dtText) => {
|
||||
const dt = Array.from(document.querySelectorAll('dt')).find(el => el.textContent.includes(dtText));
|
||||
return dt ? dt.nextElementSibling.textContent.trim() : '';
|
||||
};
|
||||
|
||||
const playItems = Array.from(document.querySelectorAll('.play a[onclick]')).map(a => {
|
||||
const match = a.getAttribute('onclick').match(/bb_a\('([^']+)','([^']+)'/);
|
||||
return `${match[2]}$${match[1]}`;
|
||||
});
|
||||
|
||||
list = [{
|
||||
vod_id: ids[0],
|
||||
vod_name: getText('片名'),
|
||||
vod_pic: 'https:' + document.querySelector('img[src*="//pics.hanju7.com/"]').getAttribute('src'),
|
||||
vod_remarks: getText('状态'),
|
||||
vod_year: getText('上映').split('-')[0],
|
||||
vod_actor: getText('主演'),
|
||||
vod_content: document.querySelector(".juqing").textContent.replace(/\s+/g, ' ').trim(),
|
||||
vod_play_from: '新韩剧网',
|
||||
vod_play_url: playItems.join('#')
|
||||
}];
|
||||
|
||||
console.log("详情列表:", list);
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list };
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
let res = await Java.req(`${baseUrl}/search/`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
body: `show=searchkey&keyboard=${encodeURIComponent(key)}`
|
||||
});
|
||||
// console.log("搜索响应:", res);
|
||||
|
||||
const document = res.doc;
|
||||
const videos = Array.from(document.querySelectorAll('#t ~ li')).map(li => ({
|
||||
vod_id: baseUrl + li.querySelector('a[href^="/detail/"]').getAttribute('href'),
|
||||
vod_name: li.querySelector('a').getAttribute('title'),
|
||||
vod_year: li.querySelector('#time').textContent,
|
||||
vod_remarks: li.querySelector('a').textContent.match(/\((\d{4})\)/)?.[1] + ' | ' + li.querySelector('#actor').textContent,
|
||||
|
||||
}));
|
||||
const total = videos.length;
|
||||
return { code: 1, msg: "数据列表", list: videos, page: 1, pagecount: 1, limit: total, total: total };
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
// Java.showWebView();
|
||||
|
||||
const ids = id.split('_');
|
||||
const playPageUrl = `https://www.hanju7.com/detail/${ids[0]}.html`;
|
||||
return {
|
||||
type: 'sniff',
|
||||
url: playPageUrl,
|
||||
keyword: '.m3u8|.mp4',
|
||||
script: `document.querySelectorAll('.play a[onclick]')[${ids[2] - 1}]?.click();`,
|
||||
timeout: 15
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* action
|
||||
*/
|
||||
async function action(actionStr) {
|
||||
try {
|
||||
const params = JSON.parse(actionStr);
|
||||
console.log("action params:", params);
|
||||
} catch (e) {
|
||||
console.log("action is not JSON, treat as string");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList(document) {
|
||||
const list = Array.from(document.querySelectorAll('.list li')).map(li => ({
|
||||
vod_id: baseUrl + li.querySelector('a[href^="/detail/"]').getAttribute('href'),
|
||||
vod_name: li.querySelector('a[href^="/detail/"]').getAttribute('title'),
|
||||
vod_pic: 'https:' + li.querySelector('a').getAttribute('data-original'),
|
||||
vod_year: li.querySelector('.tip').textContent
|
||||
}));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(document) {
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 导出对象 ---------------- */
|
||||
const spider = { init, homeContent, homeVideoContent, categoryContent, detailContent, searchContent, playerContent, action };
|
||||
spider;
|
||||
@@ -0,0 +1,238 @@
|
||||
/**
|
||||
* 欧乐影院 爬虫
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2025-12-17
|
||||
* 发布页 https://www.oleol.com/
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://www.oleol.com/';
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*/
|
||||
async function init(cfg) {
|
||||
return {
|
||||
webview: {
|
||||
debug: true,
|
||||
showWebView: true,
|
||||
widthPercent: 80,
|
||||
heightPercent: 60,
|
||||
keyword: '',
|
||||
returnType: 'dom',
|
||||
timeout: 30,
|
||||
blockImages: true,
|
||||
enableJavaScript: true,
|
||||
header: { 'Referer': baseUrl },
|
||||
blockList: [
|
||||
"*.ico*",
|
||||
"*.png*",
|
||||
"*.jpg*",
|
||||
"*.jpeg*",
|
||||
"*.gif*",
|
||||
"*.webp*",
|
||||
"*.css*"
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "1", type_name: "电影" },
|
||||
{ type_id: "2", type_name: "电视剧" },
|
||||
{ type_id: "4", type_name: "动漫" }
|
||||
],
|
||||
filters: {
|
||||
"1": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"动作片",v:"dongzuopian"}, {n:"剧情片",v:"juqingpian"}, {n:"冒险片",v:"maoxianpian"}, {n:"惊悚片",v:"jingsongpian"}, {n:"喜剧片",v:"xijupian"}, {n:"爱情片",v:"aiqingpian"}, {n:"科幻片",v:"kehuanpian"}, {n:"战争片",v:"zhanzhengpian"}, {n:"警匪片",v:"jingfeipian"}, {n:"犯罪片",v:"fanzuipian"}, {n:"恐怖片",v:"kongbupian"}, {n:"悬疑片",v:"xuanyipian"}, {n:"灾难片",v:"zainanpian"}, {n:"奇幻片",v:"qihuanpian"}, {n:"动画片",v:"donghuapian"}, {n:"其他片",v:"qitapian"} ] },
|
||||
{ key: "class", 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:"网络电影"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"法国",v:"法国"}, {n:"英国",v:"英国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"}, {n:"德国",v:"德国"}, {n:"泰国",v:"泰国"}, {n:"印度",v:"印度"}, {n:"意大利",v:"意大利"}, {n:"西班牙",v:"西班牙"}, {n:"加拿大",v:"加拿大"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"法语",v:"法语"}, {n:"德语",v:"德语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"2": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"国产剧",v:"guochanju"}, {n:"港台剧",v:"gangtaiju"}, {n:"日韩剧",v:"rihanju"}, {n:"欧美剧",v:"oumeiju"}, {n:"泰国剧",v:"taiguoju"}, {n:"其他剧",v:"qitaju"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"内地",v:"内地"}, {n:"韩国",v:"韩国"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"泰国",v:"泰国"}, {n:"英国",v:"英国"}, {n:"新加坡",v:"新加坡"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"4": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"日韩动漫",v:"rihandongman"}, {n:"国产动漫",v:"guochandongman"}, {n:"欧美动漫",v:"oumeidongman"}, {n:"港台动漫",v:"gangtaidongman"}, {n:"其他动漫",v:"qitadongman"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"国产",v:"国产"}, {n:"日本",v:"日本"}, {n:"欧美",v:"欧美"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(baseUrl + '/');
|
||||
const videos = parseVideoList(document);
|
||||
return { list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
|
||||
const area = extend.area || '';
|
||||
const year = extend.year || '';
|
||||
const cat = extend.class || '';
|
||||
const sort = extend.sort || '';
|
||||
const type = extend.type || tid;
|
||||
const lang = extend.lang || '';
|
||||
|
||||
// console.log("筛选参数:", extend, `type=${type}, area=${area}, year=${year}, cat=${cat}, sort=${sort}, lang=${lang}`);
|
||||
// const document = await Java.wvOpen(`${baseUrl}/list/${type||tid}-${area}-${sort}-${cat}-${lang}----${pg}---${year}.html`);
|
||||
const document = await Java.wvOpen(`${baseUrl}/show/${tid}-${area}-${sort}-${type}-${lang}-${letter}---${pg}---${year}.html`);
|
||||
const videos = parseVideoList(document);
|
||||
const getPages = document.querySelector("ul > li.active.num").outerText;
|
||||
const pages = getPages.split('/');
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total: pages[1] * 12 };
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
// Java.showWebView();
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
const list = parseDetailPage(document);
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list };
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
let res = await Java.req(`${baseUrl}/search/${key}----------${pg}---.html`);
|
||||
const videos = parseVideoList(res.doc);
|
||||
let pages = [1, 1];
|
||||
let total = videos.length;
|
||||
try {
|
||||
const getPages = res.doc.querySelector("ul > li.active.num").outerText;
|
||||
pages = getPages.split('/');
|
||||
total = parseInt(pages[1]) * 12;
|
||||
} catch (e) {}
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total };
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 1 };
|
||||
}
|
||||
|
||||
/**
|
||||
* action
|
||||
*/
|
||||
async function action(actionStr) {
|
||||
try {
|
||||
const params = JSON.parse(actionStr);
|
||||
console.log("action params:", params);
|
||||
} catch (e) {
|
||||
console.log("action is not JSON, treat as string");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList(document) {
|
||||
const boxes = Array.from(document.querySelectorAll('.stui-vodlist__box'));
|
||||
const list = boxes.map(box => {
|
||||
const titleEl = box.querySelector('.title a');
|
||||
const thumbEl = box.querySelector('.stui-vodlist__thumb');
|
||||
const remarksEl = box.querySelector('.pic-text');
|
||||
|
||||
// 处理 vod_id
|
||||
let vodId = titleEl?.getAttribute('href') || '';
|
||||
if (vodId && !vodId.startsWith('http')) {
|
||||
vodId = baseUrl + (vodId.startsWith('/') ? '' : '/') + vodId;
|
||||
}
|
||||
|
||||
return {
|
||||
vod_name: titleEl?.title || titleEl?.textContent || '',
|
||||
vod_pic: thumbEl?.getAttribute('data-original') ||
|
||||
thumbEl?.style.backgroundImage?.match(/url\(["']?([^"')]+)["']?\)/)?.[1] || '',
|
||||
vod_remarks: remarksEl?.textContent || '',
|
||||
vod_id: vodId,
|
||||
vod_actor: (() => {
|
||||
const textEl = box.querySelector('.text');
|
||||
const comment = textEl?.previousSibling;
|
||||
return comment?.nodeType === 8 ? comment.textContent.trim() : '';
|
||||
})()
|
||||
};
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(document) {
|
||||
const title = document.querySelector('.stui-content__detail .title')?.textContent.trim() || '';
|
||||
const vod_pic = document.querySelector('.stui-content__thumb img')?.src || '';
|
||||
const info = document.querySelectorAll('.stui-content__detail .data');
|
||||
|
||||
const typeMatch = info[0]?.textContent.match(/类型:([^/]+)\s*\/\s*地区:([^/]+)\s*\/\s*年份:(\d+)/) || [];
|
||||
const type_name = typeMatch[1] || '', vod_area = typeMatch[2] || '', vod_year = typeMatch[3] || '';
|
||||
const vod_actor = info[1]?.textContent.replace('主演:', '').trim() || '';
|
||||
const vod_director = info[2]?.textContent.replace('导演:', '').trim() || '';
|
||||
const vod_remarks = info[3]?.textContent.replace('更新:', '').trim() || '';
|
||||
const vod_content = document.querySelector('.detail-content')?.textContent.trim() ||
|
||||
document.querySelector('.detail-sketch')?.textContent.trim() || '';
|
||||
|
||||
// 播放线路
|
||||
const head = document.querySelector('.stui-vodlist__head h3');
|
||||
const ul = document.querySelector('.stui-content__playlist');
|
||||
const episodes = ul ? Array.from(ul.querySelectorAll('a')).map(a =>
|
||||
`${a.textContent.trim()}$${baseUrl + a.getAttribute('href')}`) : [];
|
||||
const vod_play_from = head ? head.textContent.trim().replace('在线播放', '线路') : '';
|
||||
const vod_play_url = episodes.join('#');
|
||||
|
||||
return [{
|
||||
vod_id: window.location.pathname.replace(/[^\w]/g, '_'),
|
||||
vod_name: title,
|
||||
vod_pic: vod_pic,
|
||||
vod_remarks: vod_remarks,
|
||||
vod_year: vod_year,
|
||||
vod_actor: vod_actor,
|
||||
vod_director: vod_director,
|
||||
vod_area: vod_area,
|
||||
vod_lang: vod_area.includes('大陆') ? '国语' : '其他',
|
||||
vod_content: vod_content,
|
||||
vod_play_from: vod_play_from,
|
||||
vod_play_url: vod_play_url
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 导出对象 ---------------- */
|
||||
const spider = { init, homeContent, homeVideoContent, categoryContent, detailContent, searchContent, playerContent, action };
|
||||
spider;
|
||||
@@ -0,0 +1,238 @@
|
||||
/**
|
||||
* 注视影视 爬虫
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2025-12-17
|
||||
* 发布页 https://gaze.run/
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://gaze.run/';
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*/
|
||||
async function init(cfg) {
|
||||
return {
|
||||
webview: {
|
||||
debug: true,
|
||||
showWebView: true,
|
||||
widthPercent: 80,
|
||||
heightPercent: 60,
|
||||
keyword: '',
|
||||
returnType: 'dom',
|
||||
timeout: 30,
|
||||
blockImages: true,
|
||||
enableJavaScript: true,
|
||||
header: { 'Referer': baseUrl },
|
||||
blockList: [
|
||||
"*.ico*",
|
||||
"*.png*",
|
||||
"*.jpg*",
|
||||
"*.jpeg*",
|
||||
"*.gif*",
|
||||
"*.webp*",
|
||||
"*.css*"
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "1", type_name: "电影" },
|
||||
{ type_id: "2", type_name: "电视剧" },
|
||||
{ type_id: "4", type_name: "动漫" }
|
||||
],
|
||||
filters: {
|
||||
"1": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"动作片",v:"dongzuopian"}, {n:"剧情片",v:"juqingpian"}, {n:"冒险片",v:"maoxianpian"}, {n:"惊悚片",v:"jingsongpian"}, {n:"喜剧片",v:"xijupian"}, {n:"爱情片",v:"aiqingpian"}, {n:"科幻片",v:"kehuanpian"}, {n:"战争片",v:"zhanzhengpian"}, {n:"警匪片",v:"jingfeipian"}, {n:"犯罪片",v:"fanzuipian"}, {n:"恐怖片",v:"kongbupian"}, {n:"悬疑片",v:"xuanyipian"}, {n:"灾难片",v:"zainanpian"}, {n:"奇幻片",v:"qihuanpian"}, {n:"动画片",v:"donghuapian"}, {n:"其他片",v:"qitapian"} ] },
|
||||
{ key: "class", 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:"网络电影"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"法国",v:"法国"}, {n:"英国",v:"英国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"}, {n:"德国",v:"德国"}, {n:"泰国",v:"泰国"}, {n:"印度",v:"印度"}, {n:"意大利",v:"意大利"}, {n:"西班牙",v:"西班牙"}, {n:"加拿大",v:"加拿大"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"法语",v:"法语"}, {n:"德语",v:"德语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"2": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"国产剧",v:"guochanju"}, {n:"港台剧",v:"gangtaiju"}, {n:"日韩剧",v:"rihanju"}, {n:"欧美剧",v:"oumeiju"}, {n:"泰国剧",v:"taiguoju"}, {n:"其他剧",v:"qitaju"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"内地",v:"内地"}, {n:"韩国",v:"韩国"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"泰国",v:"泰国"}, {n:"英国",v:"英国"}, {n:"新加坡",v:"新加坡"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"4": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"日韩动漫",v:"rihandongman"}, {n:"国产动漫",v:"guochandongman"}, {n:"欧美动漫",v:"oumeidongman"}, {n:"港台动漫",v:"gangtaidongman"}, {n:"其他动漫",v:"qitadongman"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"国产",v:"国产"}, {n:"日本",v:"日本"}, {n:"欧美",v:"欧美"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(baseUrl + '/');
|
||||
const videos = parseVideoList(document);
|
||||
return { list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
|
||||
const area = extend.area || '';
|
||||
const year = extend.year || '';
|
||||
const cat = extend.class || '';
|
||||
const sort = extend.sort || '';
|
||||
const type = extend.type || tid;
|
||||
const lang = extend.lang || '';
|
||||
|
||||
// console.log("筛选参数:", extend, `type=${type}, area=${area}, year=${year}, cat=${cat}, sort=${sort}, lang=${lang}`);
|
||||
// const document = await Java.wvOpen(`${baseUrl}/list/${type||tid}-${area}-${sort}-${cat}-${lang}----${pg}---${year}.html`);
|
||||
const document = await Java.wvOpen(`${baseUrl}/show/${tid}-${area}-${sort}-${type}-${lang}-${letter}---${pg}---${year}.html`);
|
||||
const videos = parseVideoList(document);
|
||||
const getPages = document.querySelector("ul > li.active.num").outerText;
|
||||
const pages = getPages.split('/');
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total: pages[1] * 12 };
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
// Java.showWebView();
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
const list = parseDetailPage(document);
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list };
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
let res = await Java.req(`${baseUrl}/search/${key}----------${pg}---.html`);
|
||||
const videos = parseVideoList(res.doc);
|
||||
let pages = [1, 1];
|
||||
let total = videos.length;
|
||||
try {
|
||||
const getPages = res.doc.querySelector("ul > li.active.num").outerText;
|
||||
pages = getPages.split('/');
|
||||
total = parseInt(pages[1]) * 12;
|
||||
} catch (e) {}
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total };
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 1 };
|
||||
}
|
||||
|
||||
/**
|
||||
* action
|
||||
*/
|
||||
async function action(actionStr) {
|
||||
try {
|
||||
const params = JSON.parse(actionStr);
|
||||
console.log("action params:", params);
|
||||
} catch (e) {
|
||||
console.log("action is not JSON, treat as string");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList(document) {
|
||||
const boxes = Array.from(document.querySelectorAll('.stui-vodlist__box'));
|
||||
const list = boxes.map(box => {
|
||||
const titleEl = box.querySelector('.title a');
|
||||
const thumbEl = box.querySelector('.stui-vodlist__thumb');
|
||||
const remarksEl = box.querySelector('.pic-text');
|
||||
|
||||
// 处理 vod_id
|
||||
let vodId = titleEl?.getAttribute('href') || '';
|
||||
if (vodId && !vodId.startsWith('http')) {
|
||||
vodId = baseUrl + (vodId.startsWith('/') ? '' : '/') + vodId;
|
||||
}
|
||||
|
||||
return {
|
||||
vod_name: titleEl?.title || titleEl?.textContent || '',
|
||||
vod_pic: thumbEl?.getAttribute('data-original') ||
|
||||
thumbEl?.style.backgroundImage?.match(/url\(["']?([^"')]+)["']?\)/)?.[1] || '',
|
||||
vod_remarks: remarksEl?.textContent || '',
|
||||
vod_id: vodId,
|
||||
vod_actor: (() => {
|
||||
const textEl = box.querySelector('.text');
|
||||
const comment = textEl?.previousSibling;
|
||||
return comment?.nodeType === 8 ? comment.textContent.trim() : '';
|
||||
})()
|
||||
};
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(document) {
|
||||
const title = document.querySelector('.stui-content__detail .title')?.textContent.trim() || '';
|
||||
const vod_pic = document.querySelector('.stui-content__thumb img')?.src || '';
|
||||
const info = document.querySelectorAll('.stui-content__detail .data');
|
||||
|
||||
const typeMatch = info[0]?.textContent.match(/类型:([^/]+)\s*\/\s*地区:([^/]+)\s*\/\s*年份:(\d+)/) || [];
|
||||
const type_name = typeMatch[1] || '', vod_area = typeMatch[2] || '', vod_year = typeMatch[3] || '';
|
||||
const vod_actor = info[1]?.textContent.replace('主演:', '').trim() || '';
|
||||
const vod_director = info[2]?.textContent.replace('导演:', '').trim() || '';
|
||||
const vod_remarks = info[3]?.textContent.replace('更新:', '').trim() || '';
|
||||
const vod_content = document.querySelector('.detail-content')?.textContent.trim() ||
|
||||
document.querySelector('.detail-sketch')?.textContent.trim() || '';
|
||||
|
||||
// 播放线路
|
||||
const head = document.querySelector('.stui-vodlist__head h3');
|
||||
const ul = document.querySelector('.stui-content__playlist');
|
||||
const episodes = ul ? Array.from(ul.querySelectorAll('a')).map(a =>
|
||||
`${a.textContent.trim()}$${baseUrl + a.getAttribute('href')}`) : [];
|
||||
const vod_play_from = head ? head.textContent.trim().replace('在线播放', '线路') : '';
|
||||
const vod_play_url = episodes.join('#');
|
||||
|
||||
return [{
|
||||
vod_id: window.location.pathname.replace(/[^\w]/g, '_'),
|
||||
vod_name: title,
|
||||
vod_pic: vod_pic,
|
||||
vod_remarks: vod_remarks,
|
||||
vod_year: vod_year,
|
||||
vod_actor: vod_actor,
|
||||
vod_director: vod_director,
|
||||
vod_area: vod_area,
|
||||
vod_lang: vod_area.includes('大陆') ? '国语' : '其他',
|
||||
vod_content: vod_content,
|
||||
vod_play_from: vod_play_from,
|
||||
vod_play_url: vod_play_url
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 导出对象 ---------------- */
|
||||
const spider = { init, homeContent, homeVideoContent, categoryContent, detailContent, searchContent, playerContent, action };
|
||||
spider;
|
||||
@@ -0,0 +1,238 @@
|
||||
/**
|
||||
* 热播之家 爬虫
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2025-12-17
|
||||
* 发布页 https://www.rebozj.vip
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://www.rebozj.pro';
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*/
|
||||
async function init(cfg) {
|
||||
return {
|
||||
webview: {
|
||||
// debug: true,
|
||||
// showWebView: true,
|
||||
widthPercent: 80,
|
||||
heightPercent: 60,
|
||||
keyword: '',
|
||||
returnType: 'dom',
|
||||
timeout: 30,
|
||||
blockImages: true,
|
||||
enableJavaScript: true,
|
||||
header: { 'Referer': baseUrl },
|
||||
blockList: [
|
||||
"*.ico*",
|
||||
"*.png*",
|
||||
"*.jpg*",
|
||||
"*.jpeg*",
|
||||
"*.gif*",
|
||||
"*.webp*",
|
||||
"*.css*"
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "1", type_name: "电影" },
|
||||
{ type_id: "2", type_name: "电视剧" },
|
||||
{ type_id: "4", type_name: "动漫" }
|
||||
],
|
||||
filters: {
|
||||
"1": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"动作片",v:"dongzuopian"}, {n:"剧情片",v:"juqingpian"}, {n:"冒险片",v:"maoxianpian"}, {n:"惊悚片",v:"jingsongpian"}, {n:"喜剧片",v:"xijupian"}, {n:"爱情片",v:"aiqingpian"}, {n:"科幻片",v:"kehuanpian"}, {n:"战争片",v:"zhanzhengpian"}, {n:"警匪片",v:"jingfeipian"}, {n:"犯罪片",v:"fanzuipian"}, {n:"恐怖片",v:"kongbupian"}, {n:"悬疑片",v:"xuanyipian"}, {n:"灾难片",v:"zainanpian"}, {n:"奇幻片",v:"qihuanpian"}, {n:"动画片",v:"donghuapian"}, {n:"其他片",v:"qitapian"} ] },
|
||||
{ key: "class", 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:"网络电影"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"法国",v:"法国"}, {n:"英国",v:"英国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"}, {n:"德国",v:"德国"}, {n:"泰国",v:"泰国"}, {n:"印度",v:"印度"}, {n:"意大利",v:"意大利"}, {n:"西班牙",v:"西班牙"}, {n:"加拿大",v:"加拿大"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"法语",v:"法语"}, {n:"德语",v:"德语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"2": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"国产剧",v:"guochanju"}, {n:"港台剧",v:"gangtaiju"}, {n:"日韩剧",v:"rihanju"}, {n:"欧美剧",v:"oumeiju"}, {n:"泰国剧",v:"taiguoju"}, {n:"其他剧",v:"qitaju"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"内地",v:"内地"}, {n:"韩国",v:"韩国"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"泰国",v:"泰国"}, {n:"英国",v:"英国"}, {n:"新加坡",v:"新加坡"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"4": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"日韩动漫",v:"rihandongman"}, {n:"国产动漫",v:"guochandongman"}, {n:"欧美动漫",v:"oumeidongman"}, {n:"港台动漫",v:"gangtaidongman"}, {n:"其他动漫",v:"qitadongman"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"国产",v:"国产"}, {n:"日本",v:"日本"}, {n:"欧美",v:"欧美"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(baseUrl + '/');
|
||||
const videos = parseVideoList(document);
|
||||
return { list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
|
||||
const area = extend.area || '';
|
||||
const year = extend.year || '';
|
||||
const cat = extend.class || '';
|
||||
const sort = extend.sort || '';
|
||||
const type = extend.type || tid;
|
||||
const lang = extend.lang || '';
|
||||
|
||||
// console.log("筛选参数:", extend, `type=${type}, area=${area}, year=${year}, cat=${cat}, sort=${sort}, lang=${lang}`);
|
||||
// const document = await Java.wvOpen(`${baseUrl}/list/${type||tid}-${area}-${sort}-${cat}-${lang}----${pg}---${year}.html`);
|
||||
const document = await Java.wvOpen(`${baseUrl}/show/${tid}-${area}-${sort}-${type}-${lang}-${letter}---${pg}---${year}.html`);
|
||||
const videos = parseVideoList(document);
|
||||
const getPages = document.querySelector("ul > li.active.num").outerText;
|
||||
const pages = getPages.split('/');
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total: pages[1] * 12 };
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
// Java.showWebView();
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
const list = parseDetailPage(document);
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list };
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
let res = await Java.req(`${baseUrl}/search/${key}----------${pg}---.html`);
|
||||
const videos = parseVideoList(res.doc);
|
||||
let pages = [1, 1];
|
||||
let total = videos.length;
|
||||
try {
|
||||
const getPages = res.doc.querySelector("ul > li.active.num").outerText;
|
||||
pages = getPages.split('/');
|
||||
total = parseInt(pages[1]) * 12;
|
||||
} catch (e) {}
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total };
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 1 };
|
||||
}
|
||||
|
||||
/**
|
||||
* action
|
||||
*/
|
||||
async function action(actionStr) {
|
||||
try {
|
||||
const params = JSON.parse(actionStr);
|
||||
console.log("action params:", params);
|
||||
} catch (e) {
|
||||
console.log("action is not JSON, treat as string");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList(document) {
|
||||
const boxes = Array.from(document.querySelectorAll('.stui-vodlist__box'));
|
||||
const list = boxes.map(box => {
|
||||
const titleEl = box.querySelector('.title a');
|
||||
const thumbEl = box.querySelector('.stui-vodlist__thumb');
|
||||
const remarksEl = box.querySelector('.pic-text');
|
||||
|
||||
// 处理 vod_id
|
||||
let vodId = titleEl?.getAttribute('href') || '';
|
||||
if (vodId && !vodId.startsWith('http')) {
|
||||
vodId = baseUrl + (vodId.startsWith('/') ? '' : '/') + vodId;
|
||||
}
|
||||
|
||||
return {
|
||||
vod_name: titleEl?.title || titleEl?.textContent || '',
|
||||
vod_pic: thumbEl?.getAttribute('data-original') ||
|
||||
thumbEl?.style.backgroundImage?.match(/url\(["']?([^"')]+)["']?\)/)?.[1] || '',
|
||||
vod_remarks: remarksEl?.textContent || '',
|
||||
vod_id: vodId,
|
||||
vod_actor: (() => {
|
||||
const textEl = box.querySelector('.text');
|
||||
const comment = textEl?.previousSibling;
|
||||
return comment?.nodeType === 8 ? comment.textContent.trim() : '';
|
||||
})()
|
||||
};
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(document) {
|
||||
const title = document.querySelector('.stui-content__detail .title')?.textContent.trim() || '';
|
||||
const vod_pic = document.querySelector('.stui-content__thumb img')?.src || '';
|
||||
const info = document.querySelectorAll('.stui-content__detail .data');
|
||||
|
||||
const typeMatch = info[0]?.textContent.match(/类型:([^/]+)\s*\/\s*地区:([^/]+)\s*\/\s*年份:(\d+)/) || [];
|
||||
const type_name = typeMatch[1] || '', vod_area = typeMatch[2] || '', vod_year = typeMatch[3] || '';
|
||||
const vod_actor = info[1]?.textContent.replace('主演:', '').trim() || '';
|
||||
const vod_director = info[2]?.textContent.replace('导演:', '').trim() || '';
|
||||
const vod_remarks = info[3]?.textContent.replace('更新:', '').trim() || '';
|
||||
const vod_content = document.querySelector('.detail-content')?.textContent.trim() ||
|
||||
document.querySelector('.detail-sketch')?.textContent.trim() || '';
|
||||
|
||||
// 播放线路
|
||||
const head = document.querySelector('.stui-vodlist__head h3');
|
||||
const ul = document.querySelector('.stui-content__playlist');
|
||||
const episodes = ul ? Array.from(ul.querySelectorAll('a')).map(a =>
|
||||
`${a.textContent.trim()}$${baseUrl + a.getAttribute('href')}`) : [];
|
||||
const vod_play_from = head ? head.textContent.trim().replace('在线播放', '线路') : '';
|
||||
const vod_play_url = episodes.join('#');
|
||||
|
||||
return [{
|
||||
vod_id: window.location.pathname.replace(/[^\w]/g, '_'),
|
||||
vod_name: title,
|
||||
vod_pic: vod_pic,
|
||||
vod_remarks: vod_remarks,
|
||||
vod_year: vod_year,
|
||||
vod_actor: vod_actor,
|
||||
vod_director: vod_director,
|
||||
vod_area: vod_area,
|
||||
vod_lang: vod_area.includes('大陆') ? '国语' : '其他',
|
||||
vod_content: vod_content,
|
||||
vod_play_from: vod_play_from,
|
||||
vod_play_url: vod_play_url
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 导出对象 ---------------- */
|
||||
const spider = { init, homeContent, homeVideoContent, categoryContent, detailContent, searchContent, playerContent, action };
|
||||
spider;
|
||||
+229
@@ -0,0 +1,229 @@
|
||||
/**
|
||||
* 爱追剧(aizju)爬虫
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2025-12-20
|
||||
* 发布页 https://www.aizju.com
|
||||
* @config
|
||||
// * debug: true
|
||||
// * showWebView: true
|
||||
* percent: 80,60
|
||||
* returnType: dom
|
||||
* timeout: 30
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
const baseUrl = 'https://www.aizju.com';
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*/
|
||||
async function init(cfg) {
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "1", type_name: "电影" },
|
||||
{ type_id: "2", type_name: "连续剧" },
|
||||
{ type_id: "3", type_name: "综艺" },
|
||||
{ type_id: "4", type_name: "动漫" }
|
||||
],
|
||||
filters: {
|
||||
"1": [
|
||||
{ key: "type", 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:"网络电影"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"法国",v:"法国"}, {n:"英国",v:"英国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"}, {n:"德国",v:"德国"}, {n:"泰国",v:"泰国"}, {n:"印度",v:"印度"}, {n:"意大利",v:"意大利"}, {n:"西班牙",v:"西班牙"}, {n:"加拿大",v:"加拿大"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"} ] },
|
||||
{ key: "lang", name: "语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"法语",v:"法语"}, {n:"德语",v:"德语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "letter", name: "字母", value: [ {n:"全部",v:""}, {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: "sort", name: "按排序", value: [ {n:"最新",v:"time"}, {n:"最热",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"2": [
|
||||
{ key: "type", 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:"其他"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"内地",v:"内地"}, {n:"韩国",v:"韩国"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"泰国",v:"泰国"}, {n:"英国",v:"英国"}, {n:"新加坡",v:"新加坡"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"} ] },
|
||||
{ key: "lang", name: "语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "letter", name: "字母", value: [ {n:"全部",v:""}, {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: "sort", name: "按排序", value: [ {n:"最新",v:"time"}, {n:"最热",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"3": [
|
||||
{ key: "type", 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:"求职"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"内地",v:"内地"}, {n:"港台",v:"港台"}, {n:"日韩",v:"日韩"}, {n:"欧美",v:"欧美"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2025",v:"2025"}, {n:"2024",v:"2024"}, {n:"2023",v:"2023"}, {n:"2022",v:"2022"}, {n:"2021",v:"2021"}, {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:"2008",v:"2008"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "letter", name: "字母", value: [ {n:"全部",v:""}, {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: "sort", name: "按排序", value: [ {n:"最新",v:"time"}, {n:"最热",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"4": [
|
||||
{ key: "type", 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:"其他"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"国产",v:"国产"}, {n:"日本",v:"日本"}, {n:"欧美",v:"欧美"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"} ] },
|
||||
{ key: "lang", name: "语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "letter", name: "字母", value: [ {n:"全部",v:""}, {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: "sort", name: "按排序", value: [ {n:"最新",v:"time"}, {n:"最热",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
let res = Java.req(baseUrl);
|
||||
if (res.error) return Result.error('获取数据失败:' + res.error);
|
||||
const doc = res.doc;
|
||||
const videos = parseVideoList(doc);
|
||||
return { list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
const area = extend.area || '';
|
||||
const year = extend.year || '';
|
||||
const type = extend.class || '';
|
||||
const sort = extend.sort || '';
|
||||
const letter = extend.letter || '';
|
||||
const lang = extend.lang || '';
|
||||
|
||||
//https://www.aizju.com/vodshow/3-地区-排序-类型-语言-字母---分页---年份.html
|
||||
const res = Java.req(`${baseUrl}/vodshow/${tid}-${area}-${sort}-${type}-${lang}-${letter}---${pg}---${year}.html`);
|
||||
const doc = res.doc;
|
||||
const videos = parseVideoList(doc);
|
||||
|
||||
let pages = [1, 1];
|
||||
let total = videos.length;
|
||||
try {
|
||||
const getPages = doc.querySelector("#conch-content .hl-page-total").textContent.replace(/\D*(\d+)\s*\/\s*(\d+)\D*/, '$1/$2');
|
||||
pages = getPages.split('/');
|
||||
total = doc.querySelector("#conch-content .hl-head-page em").textContent;
|
||||
} catch (e) {}
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 36, total: pages[1] * 36 };
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
const res = Java.req(baseUrl + ids[0]);
|
||||
const doc = res.doc;
|
||||
|
||||
const list = parseDetailPage(doc, ids[0]);
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list };
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
const url = `${baseUrl}/vodsearch/${key}----------${pg}---.html`;
|
||||
|
||||
console.log("搜索被调用, 参数:", url, key, quick, pg);
|
||||
|
||||
let res = Java.req(url);
|
||||
|
||||
const vods = [];
|
||||
const items = res.doc.querySelectorAll('.hl-one-list .hl-list-item');
|
||||
|
||||
items.forEach(item => {
|
||||
const link = item.querySelector('.hl-item-thumb');
|
||||
const vod = {
|
||||
vod_id: link?.getAttribute('href') || '',
|
||||
vod_name: link?.getAttribute('title') || '',
|
||||
vod_pic: link?.getAttribute('data-original') || '',
|
||||
|
||||
vod_remarks: item.querySelector('.remarks')?.textContent?.trim() || '',
|
||||
};
|
||||
vods.push(vod);
|
||||
});
|
||||
|
||||
const pageText = res.doc.querySelector('.hl-page-total')?.textContent || '1 / 1';
|
||||
const pages = pageText.split('/').map(num => parseInt(num.trim().replace('页', '')) || 1);
|
||||
|
||||
return { code: 1, msg: "数据列表", list: vods, page: pages[0], pagecount: pages[1], limit: 12, total: pages[1] * 12 };
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 1 };
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList(document) {
|
||||
const vods = [];
|
||||
const items = document.querySelectorAll('.hl-vod-list .hl-list-item');
|
||||
|
||||
items.forEach(item => {
|
||||
const link = item.querySelector('.hl-item-thumb');
|
||||
const titleLink = item.querySelector('.hl-item-title a');
|
||||
|
||||
const vod = {
|
||||
vod_id: link?.getAttribute('href') || titleLink?.getAttribute('href') || '',
|
||||
vod_name: link?.getAttribute('title') || titleLink?.getAttribute('title') || '',
|
||||
vod_pic: link?.getAttribute('data-original') || '',
|
||||
vod_remarks: item.querySelector('.remarks')?.textContent?.trim() || '',
|
||||
};
|
||||
|
||||
vods.push(vod);
|
||||
});
|
||||
|
||||
return vods;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(document, vod_id) {
|
||||
|
||||
const vod_name = document.querySelector('.video-name')?.textContent?.trim() || '';
|
||||
const vod_pic = document.querySelector('.hl-item-thumb')?.getAttribute('data-original') || '';
|
||||
const vod_year = document.querySelector('.video-class')?.firstChild?.textContent?.trim() || '';
|
||||
const vod_content = document.querySelector('li.hl-col-xs-12[style*="font-size: 14px"]')?.textContent?.replace('简介', '').trim() || '';
|
||||
|
||||
const playSources = document.querySelectorAll('.hl-playlists');
|
||||
const vod_play_from = Array.from(playSources).map(item => item.getAttribute('alt')).filter(Boolean).join('$$$');
|
||||
|
||||
const playBoxes = document.querySelectorAll('.hl-tabs-box');
|
||||
const playUrls = [];
|
||||
playBoxes.forEach(box => {
|
||||
const episodes = Array.from(box.querySelectorAll('a[href*="/vodplay/"]')).map(link => {
|
||||
const epName = link.textContent?.trim();
|
||||
const epUrl = link.getAttribute('href');
|
||||
const fullUrl = epUrl.startsWith('http') ? epUrl : baseUrl + epUrl;
|
||||
return `${epName}$${fullUrl}`;
|
||||
}).filter(ep => ep);
|
||||
if (episodes.length > 0) {
|
||||
playUrls.push(episodes.join('#'));
|
||||
}
|
||||
});
|
||||
const vod_play_url = playUrls.join('$$$');
|
||||
|
||||
return [{
|
||||
vod_id: vod_id,
|
||||
vod_name: vod_name,
|
||||
vod_pic: vod_pic,
|
||||
vod_remarks: '',
|
||||
vod_year: vod_year,
|
||||
vod_lang: '国语',
|
||||
vod_content: vod_content,
|
||||
vod_play_from: vod_play_from,
|
||||
vod_play_url: vod_play_url
|
||||
}];
|
||||
}
|
||||
+238
@@ -0,0 +1,238 @@
|
||||
/**
|
||||
* 茶杯狐 爬虫
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2025-12-17
|
||||
* 发布页 https://www.cupfox.ai/
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://www.cupfox.ai/';
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*/
|
||||
async function init(cfg) {
|
||||
return {
|
||||
webview: {
|
||||
debug: true,
|
||||
showWebView: true,
|
||||
widthPercent: 80,
|
||||
heightPercent: 60,
|
||||
keyword: '',
|
||||
returnType: 'dom',
|
||||
timeout: 30,
|
||||
blockImages: true,
|
||||
enableJavaScript: true,
|
||||
header: { 'Referer': baseUrl },
|
||||
blockList: [
|
||||
"*.ico*",
|
||||
"*.png*",
|
||||
"*.jpg*",
|
||||
"*.jpeg*",
|
||||
"*.gif*",
|
||||
"*.webp*",
|
||||
"*.css*"
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "1", type_name: "电影" },
|
||||
{ type_id: "2", type_name: "电视剧" },
|
||||
{ type_id: "4", type_name: "动漫" }
|
||||
],
|
||||
filters: {
|
||||
"1": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"动作片",v:"dongzuopian"}, {n:"剧情片",v:"juqingpian"}, {n:"冒险片",v:"maoxianpian"}, {n:"惊悚片",v:"jingsongpian"}, {n:"喜剧片",v:"xijupian"}, {n:"爱情片",v:"aiqingpian"}, {n:"科幻片",v:"kehuanpian"}, {n:"战争片",v:"zhanzhengpian"}, {n:"警匪片",v:"jingfeipian"}, {n:"犯罪片",v:"fanzuipian"}, {n:"恐怖片",v:"kongbupian"}, {n:"悬疑片",v:"xuanyipian"}, {n:"灾难片",v:"zainanpian"}, {n:"奇幻片",v:"qihuanpian"}, {n:"动画片",v:"donghuapian"}, {n:"其他片",v:"qitapian"} ] },
|
||||
{ key: "class", 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:"网络电影"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"法国",v:"法国"}, {n:"英国",v:"英国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"}, {n:"德国",v:"德国"}, {n:"泰国",v:"泰国"}, {n:"印度",v:"印度"}, {n:"意大利",v:"意大利"}, {n:"西班牙",v:"西班牙"}, {n:"加拿大",v:"加拿大"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"法语",v:"法语"}, {n:"德语",v:"德语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"2": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"国产剧",v:"guochanju"}, {n:"港台剧",v:"gangtaiju"}, {n:"日韩剧",v:"rihanju"}, {n:"欧美剧",v:"oumeiju"}, {n:"泰国剧",v:"taiguoju"}, {n:"其他剧",v:"qitaju"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"内地",v:"内地"}, {n:"韩国",v:"韩国"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"泰国",v:"泰国"}, {n:"英国",v:"英国"}, {n:"新加坡",v:"新加坡"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"4": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"日韩动漫",v:"rihandongman"}, {n:"国产动漫",v:"guochandongman"}, {n:"欧美动漫",v:"oumeidongman"}, {n:"港台动漫",v:"gangtaidongman"}, {n:"其他动漫",v:"qitadongman"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"国产",v:"国产"}, {n:"日本",v:"日本"}, {n:"欧美",v:"欧美"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(baseUrl + '/');
|
||||
const videos = parseVideoList(document);
|
||||
return { list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
|
||||
const area = extend.area || '';
|
||||
const year = extend.year || '';
|
||||
const cat = extend.class || '';
|
||||
const sort = extend.sort || '';
|
||||
const type = extend.type || tid;
|
||||
const lang = extend.lang || '';
|
||||
|
||||
// console.log("筛选参数:", extend, `type=${type}, area=${area}, year=${year}, cat=${cat}, sort=${sort}, lang=${lang}`);
|
||||
// const document = await Java.wvOpen(`${baseUrl}/list/${type||tid}-${area}-${sort}-${cat}-${lang}----${pg}---${year}.html`);
|
||||
const document = await Java.wvOpen(`${baseUrl}/show/${tid}-${area}-${sort}-${type}-${lang}-${letter}---${pg}---${year}.html`);
|
||||
const videos = parseVideoList(document);
|
||||
const getPages = document.querySelector("ul > li.active.num").outerText;
|
||||
const pages = getPages.split('/');
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total: pages[1] * 12 };
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
// Java.showWebView();
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
const list = parseDetailPage(document);
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list };
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
let res = await Java.req(`${baseUrl}/search/${key}----------${pg}---.html`);
|
||||
const videos = parseVideoList(res.doc);
|
||||
let pages = [1, 1];
|
||||
let total = videos.length;
|
||||
try {
|
||||
const getPages = res.doc.querySelector("ul > li.active.num").outerText;
|
||||
pages = getPages.split('/');
|
||||
total = parseInt(pages[1]) * 12;
|
||||
} catch (e) {}
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total };
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 1 };
|
||||
}
|
||||
|
||||
/**
|
||||
* action
|
||||
*/
|
||||
async function action(actionStr) {
|
||||
try {
|
||||
const params = JSON.parse(actionStr);
|
||||
console.log("action params:", params);
|
||||
} catch (e) {
|
||||
console.log("action is not JSON, treat as string");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList(document) {
|
||||
const boxes = Array.from(document.querySelectorAll('.stui-vodlist__box'));
|
||||
const list = boxes.map(box => {
|
||||
const titleEl = box.querySelector('.title a');
|
||||
const thumbEl = box.querySelector('.stui-vodlist__thumb');
|
||||
const remarksEl = box.querySelector('.pic-text');
|
||||
|
||||
// 处理 vod_id
|
||||
let vodId = titleEl?.getAttribute('href') || '';
|
||||
if (vodId && !vodId.startsWith('http')) {
|
||||
vodId = baseUrl + (vodId.startsWith('/') ? '' : '/') + vodId;
|
||||
}
|
||||
|
||||
return {
|
||||
vod_name: titleEl?.title || titleEl?.textContent || '',
|
||||
vod_pic: thumbEl?.getAttribute('data-original') ||
|
||||
thumbEl?.style.backgroundImage?.match(/url\(["']?([^"')]+)["']?\)/)?.[1] || '',
|
||||
vod_remarks: remarksEl?.textContent || '',
|
||||
vod_id: vodId,
|
||||
vod_actor: (() => {
|
||||
const textEl = box.querySelector('.text');
|
||||
const comment = textEl?.previousSibling;
|
||||
return comment?.nodeType === 8 ? comment.textContent.trim() : '';
|
||||
})()
|
||||
};
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(document) {
|
||||
const title = document.querySelector('.stui-content__detail .title')?.textContent.trim() || '';
|
||||
const vod_pic = document.querySelector('.stui-content__thumb img')?.src || '';
|
||||
const info = document.querySelectorAll('.stui-content__detail .data');
|
||||
|
||||
const typeMatch = info[0]?.textContent.match(/类型:([^/]+)\s*\/\s*地区:([^/]+)\s*\/\s*年份:(\d+)/) || [];
|
||||
const type_name = typeMatch[1] || '', vod_area = typeMatch[2] || '', vod_year = typeMatch[3] || '';
|
||||
const vod_actor = info[1]?.textContent.replace('主演:', '').trim() || '';
|
||||
const vod_director = info[2]?.textContent.replace('导演:', '').trim() || '';
|
||||
const vod_remarks = info[3]?.textContent.replace('更新:', '').trim() || '';
|
||||
const vod_content = document.querySelector('.detail-content')?.textContent.trim() ||
|
||||
document.querySelector('.detail-sketch')?.textContent.trim() || '';
|
||||
|
||||
// 播放线路
|
||||
const head = document.querySelector('.stui-vodlist__head h3');
|
||||
const ul = document.querySelector('.stui-content__playlist');
|
||||
const episodes = ul ? Array.from(ul.querySelectorAll('a')).map(a =>
|
||||
`${a.textContent.trim()}$${baseUrl + a.getAttribute('href')}`) : [];
|
||||
const vod_play_from = head ? head.textContent.trim().replace('在线播放', '线路') : '';
|
||||
const vod_play_url = episodes.join('#');
|
||||
|
||||
return [{
|
||||
vod_id: window.location.pathname.replace(/[^\w]/g, '_'),
|
||||
vod_name: title,
|
||||
vod_pic: vod_pic,
|
||||
vod_remarks: vod_remarks,
|
||||
vod_year: vod_year,
|
||||
vod_actor: vod_actor,
|
||||
vod_director: vod_director,
|
||||
vod_area: vod_area,
|
||||
vod_lang: vod_area.includes('大陆') ? '国语' : '其他',
|
||||
vod_content: vod_content,
|
||||
vod_play_from: vod_play_from,
|
||||
vod_play_url: vod_play_url
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 导出对象 ---------------- */
|
||||
const spider = { init, homeContent, homeVideoContent, categoryContent, detailContent, searchContent, playerContent, action };
|
||||
spider;
|
||||
+281
@@ -0,0 +1,281 @@
|
||||
/**
|
||||
* 剧多多 爬虫
|
||||
* 版本:3.0 - WvSpider v2.0 新架构
|
||||
* 最后更新:2025-12-23
|
||||
* 发布页 https://www.dandanyu.vip/
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://www.dandanyu.fun/';
|
||||
|
||||
/**
|
||||
* 初始化方法
|
||||
*/
|
||||
function init(cfg) {
|
||||
return {
|
||||
webview: {
|
||||
debug: true,
|
||||
showWebView: true,
|
||||
widthPercent: 80,
|
||||
keywords:'系统安全验证|系统提示......|人机验证',
|
||||
heightPercent: 60,
|
||||
timeout: 30,
|
||||
header: { 'Referer': baseUrl },
|
||||
blockList: [
|
||||
"*.css*",
|
||||
"*.ico*",
|
||||
"*.png*",
|
||||
"*.jpg*",
|
||||
"*.jpeg*",
|
||||
"*.gif*",
|
||||
"*.webp*",
|
||||
"https://bossjs.rosfky.cn/gg-config.js",
|
||||
"*.mq5yjm.com*",
|
||||
"*:8005*"
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "dianying", type_name: "电影" },
|
||||
{ type_id: "juji", type_name: "剧集" },
|
||||
{ type_id: "dongman", type_name: "动漫" },
|
||||
{ type_id: "zongyi", type_name: "综艺" },
|
||||
{ type_id: "duanju", type_name: "短剧" }
|
||||
],
|
||||
filters: {
|
||||
"dianying": [
|
||||
{ key: "type", name: "类型", value: [ {n:"全部",v:""}, {n:"动作片",v:"dongzuopian"}, {n:"喜剧片",v:"xijupian"}, {n:"爱情片",v:"aiqingpian"}, {n:"科幻片",v:"kehuanpian"}, {n:"恐怖片",v:"kongbupian"}, {n:"剧情片",v:"juqingpian"}, {n:"战争片",v:"zhanzhengpian"}, {n:"动画片",v:"donghuapian"} ] },
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {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: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"日本",v:"日本"}, {n:"泰国",v:"泰国"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"新加坡",v:"新加坡"}, {n:"马来西亚",v:"马来西亚"}, {n:"印度",v:"印度"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"德国",v:"德国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1999",v:"1999"}, {n:"1998",v:"1998"}, {n:"1997",v:"1997"}, {n:"1996",v:"1996"}, {n:"1995",v:"1995"}, {n:"1994",v:"1994"}, {n:"1993",v:"1993"}, {n:"1992",v:"1992"}, {n:"1991",v:"1991"}, {n:"1990",v:"1990"}, {n:"1989",v:"1989"}, {n:"1988",v:"1988"}, {n:"1987",v:"1987"}, {n:"1986",v:"1986"}, {n:"1985",v:"1985"}, {n:"1984",v:"1984"}, {n:"1983",v:"1983"}, {n:"1982",v:"1982"}, {n:"1981",v:"1981"}, {n:"1980",v:"1980"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"juji": [
|
||||
{ key: "type", name: "类型", value: [ {n:"全部",v:""}, {n:"国产剧",v:"guochanju"}, {n:"港台剧",v:"gangtaiju"}, {n:"日韩剧",v:"rihanju"}, {n:"欧美剧",v:"oumeiju"}, {n:"泰国剧",v:"taiguoju"} ] },
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {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: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"日本",v:"日本"}, {n:"泰国",v:"泰国"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"新加坡",v:"新加坡"}, {n:"马来西亚",v:"马来西亚"}, {n:"印度",v:"印度"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"德国",v:"德国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1999",v:"1999"}, {n:"1998",v:"1998"}, {n:"1997",v:"1997"}, {n:"1996",v:"1996"}, {n:"1995",v:"1995"}, {n:"1994",v:"1994"}, {n:"1993",v:"1993"}, {n:"1992",v:"1992"}, {n:"1991",v:"1991"}, {n:"1990",v:"1990"}, {n:"1989",v:"1989"}, {n:"1988",v:"1988"}, {n:"1987",v:"1987"}, {n:"1986",v:"1986"}, {n:"1985",v:"1985"}, {n:"1984",v:"1984"}, {n:"1983",v:"1983"}, {n:"1982",v:"1982"}, {n:"1981",v:"1981"}, {n:"1980",v:"1980"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"zongyi": [
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {n:"纪录片",v:"纪录片"}, {n:"真人秀",v:"真人秀"}, {n:"音乐",v:"音乐"}, {n:"喜剧",v:"喜剧"}, {n:"脱口秀",v:"脱口秀"}, {n:"文化",v:"文化"}, {n:"美食",v:"美食"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"日本",v:"日本"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"印度",v:"印度"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"德国",v:"德国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "lang", name: "语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1990",v:"1990"}, {n:"1980",v:"1980"}, {n:"1970",v:"1970"}, {n:"1960",v:"1960"}, {n:"1950",v:"1950"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"dongman": [
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"奇幻",v:"奇幻"}, {n:"动作",v:"动作"}, {n:"科幻",v:"科幻"}, {n:"喜剧",v:"喜剧"}, {n:"冒险",v:"冒险"}, {n:"后宫",v:"后宫"}, {n:"爱情",v:"爱情"}, {n:"悬疑",v:"悬疑"}, {n:"机战",v:"机战"}, {n:"战争",v:"战争"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1999",v:"1999"}, {n:"1998",v:"1998"}, {n:"1997",v:"1997"}, {n:"1996",v:"1996"}, {n:"1995",v:"1995"}, {n:"1994",v:"1994"}, {n:"1993",v:"1993"}, {n:"1992",v:"1992"}, {n:"1991",v:"1991"}, {n:"1990",v:"1990"}, {n:"1989",v:"1989"}, {n:"1988",v:"1988"}, {n:"1987",v:"1987"}, {n:"1986",v:"1986"}, {n:"1985",v:"1985"}, {n:"1984",v:"1984"}, {n:"1983",v:"1983"}, {n:"1982",v:"1982"}, {n:"1981",v:"1981"}, {n:"1980",v:"1980"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"duanju": [
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"都市",v:"都市"}, {n:"古装",v:"古装"}, {n:"穿越",v:"穿越"}, {n:"重生",v:"重生"}, {n:"逆袭",v:"逆袭"}, {n:"赘婿",v:"赘婿"}, {n:"战神",v:"战神"}, {n:"神医",v:"神医"}, {n:"甜宠",v:"甜宠"}, {n:"虐恋",v:"虐恋"}, {n:"言情",v:"言情"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(baseUrl);
|
||||
return { list: parseVideoList() };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类列表
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
console.log(`分类: tid=${tid}, pg=${pg}`);
|
||||
const document = await Java.wvOpen(`${baseUrl}/vodshow[/area/${extend?.area}][/by/${extend?.sort}][/class/${extend?.cate}]/id/${extend?.type||tid}[/year/${extend?.year}]/page/${pg||1}.html`);
|
||||
|
||||
const pagecount = parseInt($('#page a[title="尾页"]')?.href?.match(/page\/(\d+)/)?.[1] || '1');
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: parseVideoList(),
|
||||
page: parseInt(pg) || 1,
|
||||
pagecount: pagecount,
|
||||
limit: 40,
|
||||
total: pagecount * 40
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
console.log('获取到的id', ids);
|
||||
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: parseDetailPage(),
|
||||
page: 1,
|
||||
pagecount: 1,
|
||||
limit: 1,
|
||||
total: 1
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
console.log("搜索翻页", pg)
|
||||
// let result = Java.showCaptchaEx({
|
||||
// title: '安全验证',
|
||||
// message: '请输入下方图片中的验证码',
|
||||
// imageUrl: 'https://www.jqqzx.top/index.php/verify/index.html?',
|
||||
// headers: { Cookie: 'PHPSESSID=1d91plvokud90usu538h01778i' }
|
||||
// });
|
||||
// if (result.confirmed) {
|
||||
// Java.showAlert('取到的验证吗', result.input);
|
||||
// }
|
||||
// const url = `${baseUrl}/vodsearch${encodeURIComponent(key)}/page/${pg||1}.html`;
|
||||
// const res = await Java.req(url);
|
||||
|
||||
// 解析视频列表
|
||||
// const vods = [...res.doc.querySelectorAll('.module-card-item')].map(item => ({
|
||||
// vod_id: baseUrl + item.querySelector('a.module-card-item-poster').getAttribute('href'),
|
||||
// vod_name: item.querySelector('.module-card-item-title strong').textContent.trim(),
|
||||
// vod_pic: item.querySelector('img').getAttribute('data-original'),
|
||||
// vod_remarks: item.querySelector('.module-item-note')?.textContent.trim() || ''
|
||||
// }));
|
||||
|
||||
// 提取总页数和总数量
|
||||
// const pagecount = parseInt(res.doc.querySelector('#page a[title="尾页"]')?.getAttribute('href')?.match(/page\/(\d+)/)?.[1] || '1');
|
||||
// const total = parseInt(res.doc.querySelector('.mac_total')?.textContent || '0');
|
||||
const vods = [];
|
||||
let pageSize = 2; // 每页显示数量
|
||||
// if(pg >= 2) pageSize= 20;
|
||||
const totalPages = 20; // 总页数
|
||||
const totalItems = pageSize * totalPages; // 总数据量
|
||||
|
||||
// 计算当前页的起始序号
|
||||
const startIndex = (pg - 1) * pageSize + 1;
|
||||
|
||||
for (let i = 0; i < pageSize; i++) {
|
||||
const currentNum = startIndex + i;
|
||||
vods.push({
|
||||
vod_id: currentNum === 1 ? 'searchKeyWord' : `searchKeyWord_${currentNum}`,
|
||||
vod_name: currentNum === 1 ? '点击输入验证码' : `searchKeyWord_${currentNum}`,
|
||||
vod_remarks: `备注_${currentNum}`,
|
||||
vod_year: `年份_${currentNum}`,
|
||||
vod_director: `导演_${currentNum}`
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: vods,
|
||||
page: pg,
|
||||
pagecount: totalPages,
|
||||
limit: pageSize,
|
||||
total: totalItems
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*
|
||||
* parse 参数说明:
|
||||
* - 0: 直接播放 url
|
||||
* - 1: 需要解析的 url
|
||||
* - 2: 使用自定义嗅探(wvSpider内部嗅探)
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
console.log("播放内容:", flag, id);
|
||||
return {
|
||||
type: 'sniff',
|
||||
url: id,
|
||||
keyword: '.m3u8|.mp4',
|
||||
script: `let t=setInterval(()=>{let s=document.querySelector('iframe[src*="player.php"]')?.contentDocument?.querySelector('#start');if(s){s.click();clearInterval(t)}},100);`,
|
||||
timeout: 15
|
||||
};
|
||||
}
|
||||
|
||||
async function action(action) {
|
||||
console.log("收到的动作:", action);
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList() {
|
||||
const vods = [];
|
||||
document.querySelectorAll('a.module-poster-item').forEach(item => {
|
||||
vods.push({
|
||||
vod_id: baseUrl + (item.getAttribute('href') || ''),
|
||||
vod_name: item.getAttribute('title') || '',
|
||||
vod_pic: item.querySelector('img')?.getAttribute('data-original') || '',
|
||||
vod_remarks: item.querySelector('.module-item-note')?.textContent?.trim() || ''
|
||||
});
|
||||
});
|
||||
return vods;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage() {
|
||||
// 辅助函数
|
||||
const text = s => document.querySelector(s)?.textContent?.trim() || '';
|
||||
const attr = (s, a) => document.querySelector(s)?.getAttribute(a) || '';
|
||||
const findInfo = label => [...document.querySelectorAll('.module-info-item')].find(el => el.textContent.includes(label));
|
||||
|
||||
// 解析播放列表
|
||||
const playUrls = [];
|
||||
document.querySelectorAll('.his-tab-list').forEach(list => { // 修正:使用 querySelectorAll
|
||||
const eps = [...list.querySelectorAll('.module-play-list-link')].map(link => {
|
||||
const name = link.querySelector('span')?.textContent?.trim();
|
||||
const url = baseUrl + link.getAttribute('href');
|
||||
return name && url ? `${name}$${url}` : null;
|
||||
}).filter(Boolean);
|
||||
if (eps.length) playUrls.push(eps.join('#'));
|
||||
});
|
||||
|
||||
// 获取线路名称
|
||||
const playFrom = [...document.querySelectorAll('.module-tab-item span')]
|
||||
.map(s => s.textContent.trim())
|
||||
.filter(Boolean)
|
||||
.join('$$$');
|
||||
|
||||
return [{
|
||||
vod_id: location.href,
|
||||
vod_name: text('.module-info-heading h1'),
|
||||
vod_pic: attr('.module-item-pic img', 'data-original'),
|
||||
vod_remarks: findInfo('集数')?.querySelector('.module-info-item-content')?.textContent?.trim() || '',
|
||||
vod_year: attr('.module-info-tag-link a[title*="202"]', 'title'),
|
||||
vod_director: findInfo('导演')
|
||||
? [...findInfo('导演').querySelectorAll('a')].map(a => a.textContent.trim()).join('/')
|
||||
: '',
|
||||
vod_actor: findInfo('主演')
|
||||
? [...findInfo('主演').querySelectorAll('a')].map(a => a.textContent.trim()).join('/')
|
||||
: '',
|
||||
vod_content: text('.module-info-introduction-content p'),
|
||||
vod_play_from: playFrom,
|
||||
vod_play_url: playUrls.join('$$$')
|
||||
}];
|
||||
}
|
||||
|
||||
/* ---------------- 导出对象 ---------------- */
|
||||
const spider = { init, homeContent, homeVideoContent, categoryContent, detailContent, searchContent, playerContent, action };
|
||||
spider;
|
||||
@@ -0,0 +1,238 @@
|
||||
/**
|
||||
* 金牌影视 爬虫
|
||||
* 作者:deepseek
|
||||
* 版本:1.0
|
||||
* 最后更新:2025-12-17
|
||||
* 发布页 https://www.jpyy.com/
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://www.x8kb9k8.com/';
|
||||
|
||||
/**
|
||||
* 初始化配置
|
||||
*/
|
||||
async function init(cfg) {
|
||||
return {
|
||||
webview: {
|
||||
debug: true,
|
||||
showWebView: true,
|
||||
widthPercent: 80,
|
||||
heightPercent: 60,
|
||||
keyword: '',
|
||||
returnType: 'dom',
|
||||
timeout: 30,
|
||||
blockImages: true,
|
||||
enableJavaScript: true,
|
||||
header: { 'Referer': baseUrl },
|
||||
blockList: [
|
||||
"*.ico*",
|
||||
"*.png*",
|
||||
"*.jpg*",
|
||||
"*.jpeg*",
|
||||
"*.gif*",
|
||||
"*.webp*",
|
||||
"*.css*"
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "1", type_name: "电影" },
|
||||
{ type_id: "2", type_name: "电视剧" },
|
||||
{ type_id: "4", type_name: "动漫" }
|
||||
],
|
||||
filters: {
|
||||
"1": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"动作片",v:"dongzuopian"}, {n:"剧情片",v:"juqingpian"}, {n:"冒险片",v:"maoxianpian"}, {n:"惊悚片",v:"jingsongpian"}, {n:"喜剧片",v:"xijupian"}, {n:"爱情片",v:"aiqingpian"}, {n:"科幻片",v:"kehuanpian"}, {n:"战争片",v:"zhanzhengpian"}, {n:"警匪片",v:"jingfeipian"}, {n:"犯罪片",v:"fanzuipian"}, {n:"恐怖片",v:"kongbupian"}, {n:"悬疑片",v:"xuanyipian"}, {n:"灾难片",v:"zainanpian"}, {n:"奇幻片",v:"qihuanpian"}, {n:"动画片",v:"donghuapian"}, {n:"其他片",v:"qitapian"} ] },
|
||||
{ key: "class", 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:"网络电影"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"大陆",v:"大陆"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"美国",v:"美国"}, {n:"法国",v:"法国"}, {n:"英国",v:"英国"}, {n:"日本",v:"日本"}, {n:"韩国",v:"韩国"}, {n:"德国",v:"德国"}, {n:"泰国",v:"泰国"}, {n:"印度",v:"印度"}, {n:"意大利",v:"意大利"}, {n:"西班牙",v:"西班牙"}, {n:"加拿大",v:"加拿大"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"法语",v:"法语"}, {n:"德语",v:"德语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"2": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"国产剧",v:"guochanju"}, {n:"港台剧",v:"gangtaiju"}, {n:"日韩剧",v:"rihanju"}, {n:"欧美剧",v:"oumeiju"}, {n:"泰国剧",v:"taiguoju"}, {n:"其他剧",v:"qitaju"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"内地",v:"内地"}, {n:"韩国",v:"韩国"}, {n:"香港",v:"香港"}, {n:"台湾",v:"台湾"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"泰国",v:"泰国"}, {n:"英国",v:"英国"}, {n:"新加坡",v:"新加坡"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
],
|
||||
"4": [
|
||||
{ key: "type", name: "按类型", value: [ {n:"全部",v:""}, {n:"日韩动漫",v:"rihandongman"}, {n:"国产动漫",v:"guochandongman"}, {n:"欧美动漫",v:"oumeidongman"}, {n:"港台动漫",v:"gangtaidongman"}, {n:"其他动漫",v:"qitadongman"} ] },
|
||||
{ key: "class", 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:"其他"} ] },
|
||||
{ key: "area", name: "按地区", value: [ {n:"全部",v:""}, {n:"国产",v:"国产"}, {n:"日本",v:"日本"}, {n:"欧美",v:"欧美"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "year", name: "按年份", value: [ {n:"全部",v:""}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"} ] },
|
||||
{ key: "lang", name: "按语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "sort", name: "按排序", value: [ {n:"时间",v:"time"}, {n:"人气",v:"hits"}, {n:"评分",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(baseUrl + '/');
|
||||
const videos = parseVideoList(document);
|
||||
return { list: videos };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类内容
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
|
||||
const area = extend.area || '';
|
||||
const year = extend.year || '';
|
||||
const cat = extend.class || '';
|
||||
const sort = extend.sort || '';
|
||||
const type = extend.type || tid;
|
||||
const lang = extend.lang || '';
|
||||
|
||||
// console.log("筛选参数:", extend, `type=${type}, area=${area}, year=${year}, cat=${cat}, sort=${sort}, lang=${lang}`);
|
||||
// const document = await Java.wvOpen(`${baseUrl}/list/${type||tid}-${area}-${sort}-${cat}-${lang}----${pg}---${year}.html`);
|
||||
const document = await Java.wvOpen(`${baseUrl}/show/${tid}-${area}-${sort}-${type}-${lang}-${letter}---${pg}---${year}.html`);
|
||||
const videos = parseVideoList(document);
|
||||
const getPages = document.querySelector("ul > li.active.num").outerText;
|
||||
const pages = getPages.split('/');
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total: pages[1] * 12 };
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
// Java.showWebView();
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
const list = parseDetailPage(document);
|
||||
return { code: 1, msg: "数据列表", page: 1, pagecount: 1, limit: 1, total: 1, list };
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
let res = await Java.req(`${baseUrl}/search/${key}----------${pg}---.html`);
|
||||
const videos = parseVideoList(res.doc);
|
||||
let pages = [1, 1];
|
||||
let total = videos.length;
|
||||
try {
|
||||
const getPages = res.doc.querySelector("ul > li.active.num").outerText;
|
||||
pages = getPages.split('/');
|
||||
total = parseInt(pages[1]) * 12;
|
||||
} catch (e) {}
|
||||
return { code: 1, msg: "数据列表", list: videos, page: pages[0], pagecount: pages[1], limit: 12, total };
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 1 };
|
||||
}
|
||||
|
||||
/**
|
||||
* action
|
||||
*/
|
||||
async function action(actionStr) {
|
||||
try {
|
||||
const params = JSON.parse(actionStr);
|
||||
console.log("action params:", params);
|
||||
} catch (e) {
|
||||
console.log("action is not JSON, treat as string");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList(document) {
|
||||
const boxes = Array.from(document.querySelectorAll('.stui-vodlist__box'));
|
||||
const list = boxes.map(box => {
|
||||
const titleEl = box.querySelector('.title a');
|
||||
const thumbEl = box.querySelector('.stui-vodlist__thumb');
|
||||
const remarksEl = box.querySelector('.pic-text');
|
||||
|
||||
// 处理 vod_id
|
||||
let vodId = titleEl?.getAttribute('href') || '';
|
||||
if (vodId && !vodId.startsWith('http')) {
|
||||
vodId = baseUrl + (vodId.startsWith('/') ? '' : '/') + vodId;
|
||||
}
|
||||
|
||||
return {
|
||||
vod_name: titleEl?.title || titleEl?.textContent || '',
|
||||
vod_pic: thumbEl?.getAttribute('data-original') ||
|
||||
thumbEl?.style.backgroundImage?.match(/url\(["']?([^"')]+)["']?\)/)?.[1] || '',
|
||||
vod_remarks: remarksEl?.textContent || '',
|
||||
vod_id: vodId,
|
||||
vod_actor: (() => {
|
||||
const textEl = box.querySelector('.text');
|
||||
const comment = textEl?.previousSibling;
|
||||
return comment?.nodeType === 8 ? comment.textContent.trim() : '';
|
||||
})()
|
||||
};
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage(document) {
|
||||
const title = document.querySelector('.stui-content__detail .title')?.textContent.trim() || '';
|
||||
const vod_pic = document.querySelector('.stui-content__thumb img')?.src || '';
|
||||
const info = document.querySelectorAll('.stui-content__detail .data');
|
||||
|
||||
const typeMatch = info[0]?.textContent.match(/类型:([^/]+)\s*\/\s*地区:([^/]+)\s*\/\s*年份:(\d+)/) || [];
|
||||
const type_name = typeMatch[1] || '', vod_area = typeMatch[2] || '', vod_year = typeMatch[3] || '';
|
||||
const vod_actor = info[1]?.textContent.replace('主演:', '').trim() || '';
|
||||
const vod_director = info[2]?.textContent.replace('导演:', '').trim() || '';
|
||||
const vod_remarks = info[3]?.textContent.replace('更新:', '').trim() || '';
|
||||
const vod_content = document.querySelector('.detail-content')?.textContent.trim() ||
|
||||
document.querySelector('.detail-sketch')?.textContent.trim() || '';
|
||||
|
||||
// 播放线路
|
||||
const head = document.querySelector('.stui-vodlist__head h3');
|
||||
const ul = document.querySelector('.stui-content__playlist');
|
||||
const episodes = ul ? Array.from(ul.querySelectorAll('a')).map(a =>
|
||||
`${a.textContent.trim()}$${baseUrl + a.getAttribute('href')}`) : [];
|
||||
const vod_play_from = head ? head.textContent.trim().replace('在线播放', '线路') : '';
|
||||
const vod_play_url = episodes.join('#');
|
||||
|
||||
return [{
|
||||
vod_id: window.location.pathname.replace(/[^\w]/g, '_'),
|
||||
vod_name: title,
|
||||
vod_pic: vod_pic,
|
||||
vod_remarks: vod_remarks,
|
||||
vod_year: vod_year,
|
||||
vod_actor: vod_actor,
|
||||
vod_director: vod_director,
|
||||
vod_area: vod_area,
|
||||
vod_lang: vod_area.includes('大陆') ? '国语' : '其他',
|
||||
vod_content: vod_content,
|
||||
vod_play_from: vod_play_from,
|
||||
vod_play_url: vod_play_url
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 导出对象 ---------------- */
|
||||
const spider = { init, homeContent, homeVideoContent, categoryContent, detailContent, searchContent, playerContent, action };
|
||||
spider;
|
||||
@@ -0,0 +1,135 @@
|
||||
/**
|
||||
* 锦鲤短剧 爬虫
|
||||
* 版本:3.0 - WvSpider v2.0 新架构
|
||||
* 最后更新:2025-12-23
|
||||
* 发布页 https://www.jinlidj.com/
|
||||
*
|
||||
* @config
|
||||
* debug: true
|
||||
*
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://api.jinlidj.com';
|
||||
|
||||
/**
|
||||
* 初始化方法
|
||||
*/
|
||||
function init(cfg) {
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
const filterConfig = {
|
||||
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: "权谋身份" }
|
||||
]
|
||||
};
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
return {};
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类列表
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
const res = Java.req(baseUrl + '/api/search', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ page: pg, limit: 24, type_id: tid })
|
||||
});
|
||||
const data = JSON.parse(res.body).data;
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: data.list,
|
||||
page: parseInt(pg) || 1,
|
||||
pagecount: parseInt(data.total / 24),
|
||||
limit: 24,
|
||||
total: data.total
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
const res = Java.req(baseUrl + '/api/detail/' + ids[0]);
|
||||
const data = JSON.parse(res.body).data;
|
||||
const player = data.player;
|
||||
const playUrlParts = [];
|
||||
for (const key in player) {
|
||||
playUrlParts.push(key + '$' + player[key] + '&auto=1');
|
||||
}
|
||||
const vod_play_url = playUrlParts.join('#');
|
||||
|
||||
const vod = {
|
||||
"vod_id": data.vod_id,
|
||||
"vod_name": data.vod_name,
|
||||
"vod_tag": data.vod_tag,
|
||||
"vod_class": data.vod_class,
|
||||
"vod_pic": data.vod_pic,
|
||||
"vod_actor": data.vod_actor,
|
||||
"vod_director": data.vod_director || "",
|
||||
"vod_content": data.vod_blurb,
|
||||
"vod_area": data.vod_area,
|
||||
"vod_year": data.vod_year,
|
||||
"vod_play_from": "在线",
|
||||
"vod_play_url": vod_play_url
|
||||
};
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: [vod],
|
||||
page: 1,
|
||||
pagecount: 1,
|
||||
limit: 1,
|
||||
total: 1
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
const res = Java.req(baseUrl + '/api/search', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ page: pg, limit: 24, keyword: key })
|
||||
});
|
||||
const data = JSON.parse(res.body).data;
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: data.list,
|
||||
page: parseInt(pg) || 1,
|
||||
pagecount: parseInt(data.total / 24),
|
||||
limit: 24,
|
||||
total: data.total
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
return { url: id, parse: 1 };
|
||||
}
|
||||
@@ -0,0 +1,281 @@
|
||||
/**
|
||||
* 飞快TV 爬虫
|
||||
* 版本:3.0 - WvSpider v2.0 新架构
|
||||
* 最后更新:2025-12-23
|
||||
* 发布页 https://feikuai.tv/
|
||||
*/
|
||||
|
||||
const baseUrl = 'https://feikuai.tv/';
|
||||
|
||||
/**
|
||||
* 初始化方法
|
||||
*/
|
||||
function init(cfg) {
|
||||
return {
|
||||
webview: {
|
||||
debug: true,
|
||||
showWebView: true,
|
||||
widthPercent: 80,
|
||||
keywords:'系统安全验证|系统提示......|人机验证',
|
||||
heightPercent: 60,
|
||||
timeout: 30,
|
||||
header: { 'Referer': baseUrl },
|
||||
blockList: [
|
||||
"*.css*",
|
||||
"*.ico*",
|
||||
"*.png*",
|
||||
"*.jpg*",
|
||||
"*.jpeg*",
|
||||
"*.gif*",
|
||||
"*.webp*",
|
||||
"https://bossjs.rosfky.cn/gg-config.js",
|
||||
"*.mq5yjm.com*",
|
||||
"*:8005*"
|
||||
]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页分类
|
||||
*/
|
||||
async function homeContent(filter) {
|
||||
const filterConfig = {
|
||||
class: [
|
||||
{ type_id: "dianying", type_name: "电影" },
|
||||
{ type_id: "juji", type_name: "剧集" },
|
||||
{ type_id: "dongman", type_name: "动漫" },
|
||||
{ type_id: "zongyi", type_name: "综艺" },
|
||||
{ type_id: "duanju", type_name: "短剧" }
|
||||
],
|
||||
filters: {
|
||||
"dianying": [
|
||||
{ key: "type", name: "类型", value: [ {n:"全部",v:""}, {n:"动作片",v:"dongzuopian"}, {n:"喜剧片",v:"xijupian"}, {n:"爱情片",v:"aiqingpian"}, {n:"科幻片",v:"kehuanpian"}, {n:"恐怖片",v:"kongbupian"}, {n:"剧情片",v:"juqingpian"}, {n:"战争片",v:"zhanzhengpian"}, {n:"动画片",v:"donghuapian"} ] },
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {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: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"日本",v:"日本"}, {n:"泰国",v:"泰国"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"新加坡",v:"新加坡"}, {n:"马来西亚",v:"马来西亚"}, {n:"印度",v:"印度"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"德国",v:"德国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1999",v:"1999"}, {n:"1998",v:"1998"}, {n:"1997",v:"1997"}, {n:"1996",v:"1996"}, {n:"1995",v:"1995"}, {n:"1994",v:"1994"}, {n:"1993",v:"1993"}, {n:"1992",v:"1992"}, {n:"1991",v:"1991"}, {n:"1990",v:"1990"}, {n:"1989",v:"1989"}, {n:"1988",v:"1988"}, {n:"1987",v:"1987"}, {n:"1986",v:"1986"}, {n:"1985",v:"1985"}, {n:"1984",v:"1984"}, {n:"1983",v:"1983"}, {n:"1982",v:"1982"}, {n:"1981",v:"1981"}, {n:"1980",v:"1980"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"juji": [
|
||||
{ key: "type", name: "类型", value: [ {n:"全部",v:""}, {n:"国产剧",v:"guochanju"}, {n:"港台剧",v:"gangtaiju"}, {n:"日韩剧",v:"rihanju"}, {n:"欧美剧",v:"oumeiju"}, {n:"泰国剧",v:"taiguoju"} ] },
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {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: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"日本",v:"日本"}, {n:"泰国",v:"泰国"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"新加坡",v:"新加坡"}, {n:"马来西亚",v:"马来西亚"}, {n:"印度",v:"印度"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"德国",v:"德国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1999",v:"1999"}, {n:"1998",v:"1998"}, {n:"1997",v:"1997"}, {n:"1996",v:"1996"}, {n:"1995",v:"1995"}, {n:"1994",v:"1994"}, {n:"1993",v:"1993"}, {n:"1992",v:"1992"}, {n:"1991",v:"1991"}, {n:"1990",v:"1990"}, {n:"1989",v:"1989"}, {n:"1988",v:"1988"}, {n:"1987",v:"1987"}, {n:"1986",v:"1986"}, {n:"1985",v:"1985"}, {n:"1984",v:"1984"}, {n:"1983",v:"1983"}, {n:"1982",v:"1982"}, {n:"1981",v:"1981"}, {n:"1980",v:"1980"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"zongyi": [
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"Netflix",v:"Netflix"}, {n:"纪录片",v:"纪录片"}, {n:"真人秀",v:"真人秀"}, {n:"音乐",v:"音乐"}, {n:"喜剧",v:"喜剧"}, {n:"脱口秀",v:"脱口秀"}, {n:"文化",v:"文化"}, {n:"美食",v:"美食"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"日本",v:"日本"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"印度",v:"印度"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"德国",v:"德国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "lang", name: "语言", value: [ {n:"全部",v:""}, {n:"国语",v:"国语"}, {n:"英语",v:"英语"}, {n:"粤语",v:"粤语"}, {n:"闽南语",v:"闽南语"}, {n:"韩语",v:"韩语"}, {n:"日语",v:"日语"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1990",v:"1990"}, {n:"1980",v:"1980"}, {n:"1970",v:"1970"}, {n:"1960",v:"1960"}, {n:"1950",v:"1950"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"dongman": [
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"奇幻",v:"奇幻"}, {n:"动作",v:"动作"}, {n:"科幻",v:"科幻"}, {n:"喜剧",v:"喜剧"}, {n:"冒险",v:"冒险"}, {n:"后宫",v:"后宫"}, {n:"爱情",v:"爱情"}, {n:"悬疑",v:"悬疑"}, {n:"机战",v:"机战"}, {n:"战争",v:"战争"}, {n:"其他",v:"其他"} ] },
|
||||
{ key: "area", name: "地区", value: [ {n:"全部",v:""}, {n:"中国大陆",v:"中国大陆"}, {n:"日本",v:"日本"}, {n:"美国",v:"美国"}, {n:"韩国",v:"韩国"}, {n:"中国香港",v:"中国香港"}, {n:"中国台湾",v:"中国台湾"}, {n:"英国",v:"英国"}, {n:"法国",v:"法国"}, {n:"加拿大",v:"加拿大"}, {n:"西班牙",v:"西班牙"}, {n:"俄罗斯",v:"俄罗斯"}, {n:"其它",v:"其它"} ] },
|
||||
{ key: "year", name: "年份", value: [ {n:"全部",v:""}, {n:"2026",v:"2026"}, {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:"2008",v:"2008"}, {n:"2007",v:"2007"}, {n:"2006",v:"2006"}, {n:"2005",v:"2005"}, {n:"2004",v:"2004"}, {n:"2003",v:"2003"}, {n:"2002",v:"2002"}, {n:"2001",v:"2001"}, {n:"2000",v:"2000"}, {n:"1999",v:"1999"}, {n:"1998",v:"1998"}, {n:"1997",v:"1997"}, {n:"1996",v:"1996"}, {n:"1995",v:"1995"}, {n:"1994",v:"1994"}, {n:"1993",v:"1993"}, {n:"1992",v:"1992"}, {n:"1991",v:"1991"}, {n:"1990",v:"1990"}, {n:"1989",v:"1989"}, {n:"1988",v:"1988"}, {n:"1987",v:"1987"}, {n:"1986",v:"1986"}, {n:"1985",v:"1985"}, {n:"1984",v:"1984"}, {n:"1983",v:"1983"}, {n:"1982",v:"1982"}, {n:"1981",v:"1981"}, {n:"1980",v:"1980"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
],
|
||||
"duanju": [
|
||||
{ key: "cate", name: "剧情", value: [ {n:"全部",v:""}, {n:"都市",v:"都市"}, {n:"古装",v:"古装"}, {n:"穿越",v:"穿越"}, {n:"重生",v:"重生"}, {n:"逆袭",v:"逆袭"}, {n:"赘婿",v:"赘婿"}, {n:"战神",v:"战神"}, {n:"神医",v:"神医"}, {n:"甜宠",v:"甜宠"}, {n:"虐恋",v:"虐恋"}, {n:"言情",v:"言情"} ] },
|
||||
{ key: "sort", name: "排序", value: [ {n:"时间排序",v:"time"}, {n:"人气排序",v:"hits"}, {n:"评分排序",v:"score"} ] }
|
||||
]
|
||||
}
|
||||
};
|
||||
return filterConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页推荐视频
|
||||
*/
|
||||
async function homeVideoContent() {
|
||||
const document = await Java.wvOpen(baseUrl);
|
||||
return { list: parseVideoList() };
|
||||
}
|
||||
|
||||
/**
|
||||
* 分类列表
|
||||
*/
|
||||
async function categoryContent(tid, pg, filter, extend) {
|
||||
console.log(`分类: tid=${tid}, pg=${pg}`);
|
||||
const document = await Java.wvOpen(`${baseUrl}/vodshow[/area/${extend?.area}][/by/${extend?.sort}][/class/${extend?.cate}]/id/${extend?.type||tid}[/year/${extend?.year}]/page/${pg||1}.html`);
|
||||
|
||||
const pagecount = parseInt($('#page a[title="尾页"]')?.href?.match(/page\/(\d+)/)?.[1] || '1');
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: parseVideoList(),
|
||||
page: parseInt(pg) || 1,
|
||||
pagecount: pagecount,
|
||||
limit: 40,
|
||||
total: pagecount * 40
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页
|
||||
*/
|
||||
async function detailContent(ids) {
|
||||
console.log('获取到的id', ids);
|
||||
|
||||
const document = await Java.wvOpen(ids[0]);
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: parseDetailPage(),
|
||||
page: 1,
|
||||
pagecount: 1,
|
||||
limit: 1,
|
||||
total: 1
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchContent(key, quick, pg) {
|
||||
console.log("搜索翻页", pg)
|
||||
// let result = Java.showCaptchaEx({
|
||||
// title: '安全验证',
|
||||
// message: '请输入下方图片中的验证码',
|
||||
// imageUrl: 'https://www.jqqzx.top/index.php/verify/index.html?',
|
||||
// headers: { Cookie: 'PHPSESSID=1d91plvokud90usu538h01778i' }
|
||||
// });
|
||||
// if (result.confirmed) {
|
||||
// Java.showAlert('取到的验证吗', result.input);
|
||||
// }
|
||||
// const url = `${baseUrl}/vodsearch${encodeURIComponent(key)}/page/${pg||1}.html`;
|
||||
// const res = await Java.req(url);
|
||||
|
||||
// 解析视频列表
|
||||
// const vods = [...res.doc.querySelectorAll('.module-card-item')].map(item => ({
|
||||
// vod_id: baseUrl + item.querySelector('a.module-card-item-poster').getAttribute('href'),
|
||||
// vod_name: item.querySelector('.module-card-item-title strong').textContent.trim(),
|
||||
// vod_pic: item.querySelector('img').getAttribute('data-original'),
|
||||
// vod_remarks: item.querySelector('.module-item-note')?.textContent.trim() || ''
|
||||
// }));
|
||||
|
||||
// 提取总页数和总数量
|
||||
// const pagecount = parseInt(res.doc.querySelector('#page a[title="尾页"]')?.getAttribute('href')?.match(/page\/(\d+)/)?.[1] || '1');
|
||||
// const total = parseInt(res.doc.querySelector('.mac_total')?.textContent || '0');
|
||||
const vods = [];
|
||||
let pageSize = 2; // 每页显示数量
|
||||
// if(pg >= 2) pageSize= 20;
|
||||
const totalPages = 20; // 总页数
|
||||
const totalItems = pageSize * totalPages; // 总数据量
|
||||
|
||||
// 计算当前页的起始序号
|
||||
const startIndex = (pg - 1) * pageSize + 1;
|
||||
|
||||
for (let i = 0; i < pageSize; i++) {
|
||||
const currentNum = startIndex + i;
|
||||
vods.push({
|
||||
vod_id: currentNum === 1 ? 'searchKeyWord' : `searchKeyWord_${currentNum}`,
|
||||
vod_name: currentNum === 1 ? '点击输入验证码' : `searchKeyWord_${currentNum}`,
|
||||
vod_remarks: `备注_${currentNum}`,
|
||||
vod_year: `年份_${currentNum}`,
|
||||
vod_director: `导演_${currentNum}`
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
code: 1,
|
||||
msg: "数据列表",
|
||||
list: vods,
|
||||
page: pg,
|
||||
pagecount: totalPages,
|
||||
limit: pageSize,
|
||||
total: totalItems
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放器
|
||||
*
|
||||
* parse 参数说明:
|
||||
* - 0: 直接播放 url
|
||||
* - 1: 需要解析的 url
|
||||
* - 2: 使用自定义嗅探(wvSpider内部嗅探)
|
||||
*/
|
||||
async function playerContent(flag, id, vipFlags) {
|
||||
console.log("播放内容:", flag, id);
|
||||
return {
|
||||
type: 'sniff',
|
||||
url: id,
|
||||
keyword: '.m3u8|.mp4',
|
||||
script: `let t=setInterval(()=>{let s=document.querySelector('iframe[src*="player.php"]')?.contentDocument?.querySelector('#start');if(s){s.click();clearInterval(t)}},100);`,
|
||||
timeout: 15
|
||||
};
|
||||
}
|
||||
|
||||
async function action(action) {
|
||||
console.log("收到的动作:", action);
|
||||
}
|
||||
|
||||
|
||||
/* ---------------- 工具函数 ---------------- */
|
||||
|
||||
/**
|
||||
* 提取视频列表
|
||||
*/
|
||||
function parseVideoList() {
|
||||
const vods = [];
|
||||
document.querySelectorAll('a.module-poster-item').forEach(item => {
|
||||
vods.push({
|
||||
vod_id: baseUrl + (item.getAttribute('href') || ''),
|
||||
vod_name: item.getAttribute('title') || '',
|
||||
vod_pic: item.querySelector('img')?.getAttribute('data-original') || '',
|
||||
vod_remarks: item.querySelector('.module-item-note')?.textContent?.trim() || ''
|
||||
});
|
||||
});
|
||||
return vods;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析详情页
|
||||
*/
|
||||
function parseDetailPage() {
|
||||
// 辅助函数
|
||||
const text = s => document.querySelector(s)?.textContent?.trim() || '';
|
||||
const attr = (s, a) => document.querySelector(s)?.getAttribute(a) || '';
|
||||
const findInfo = label => [...document.querySelectorAll('.module-info-item')].find(el => el.textContent.includes(label));
|
||||
|
||||
// 解析播放列表
|
||||
const playUrls = [];
|
||||
document.querySelectorAll('.his-tab-list').forEach(list => { // 修正:使用 querySelectorAll
|
||||
const eps = [...list.querySelectorAll('.module-play-list-link')].map(link => {
|
||||
const name = link.querySelector('span')?.textContent?.trim();
|
||||
const url = baseUrl + link.getAttribute('href');
|
||||
return name && url ? `${name}$${url}` : null;
|
||||
}).filter(Boolean);
|
||||
if (eps.length) playUrls.push(eps.join('#'));
|
||||
});
|
||||
|
||||
// 获取线路名称
|
||||
const playFrom = [...document.querySelectorAll('.module-tab-item span')]
|
||||
.map(s => s.textContent.trim())
|
||||
.filter(Boolean)
|
||||
.join('$$$');
|
||||
|
||||
return [{
|
||||
vod_id: location.href,
|
||||
vod_name: text('.module-info-heading h1'),
|
||||
vod_pic: attr('.module-item-pic img', 'data-original'),
|
||||
vod_remarks: findInfo('集数')?.querySelector('.module-info-item-content')?.textContent?.trim() || '',
|
||||
vod_year: attr('.module-info-tag-link a[title*="202"]', 'title'),
|
||||
vod_director: findInfo('导演')
|
||||
? [...findInfo('导演').querySelectorAll('a')].map(a => a.textContent.trim()).join('/')
|
||||
: '',
|
||||
vod_actor: findInfo('主演')
|
||||
? [...findInfo('主演').querySelectorAll('a')].map(a => a.textContent.trim()).join('/')
|
||||
: '',
|
||||
vod_content: text('.module-info-introduction-content p'),
|
||||
vod_play_from: playFrom,
|
||||
vod_play_url: playUrls.join('$$$')
|
||||
}];
|
||||
}
|
||||
|
||||
/* ---------------- 导出对象 ---------------- */
|
||||
const spider = { init, homeContent, homeVideoContent, categoryContent, detailContent, searchContent, playerContent, action };
|
||||
spider;
|
||||
Reference in New Issue
Block a user