Skip to content

Commit bf73f42

Browse files
committed
Update 精校古籍和阅读助手
1 parent 8fc6100 commit bf73f42

File tree

2 files changed

+47
-60
lines changed

2 files changed

+47
-60
lines changed

spider/js/独播库.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,4 @@ var rule = {
118118
}
119119
try { return base64Decode(res.replace(/\./g, '=')); } catch (e) { return ''; }
120120
},
121-
122-
123121
};

spider/js/集百动漫[漫].js

Lines changed: 47 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -4,57 +4,49 @@
44
filterable: 0,
55
quickSearch: 0,
66
title: '集百动漫',
7-
author: 'EylinSir/251129/修复版',
7+
author: 'EylinSir',
88
'类型': '影视',
99
lang: 'ds'
1010
})
1111
*/
1212

1313
var rule = {
1414
类型: '影视',
15-
author: 'EylinSir/251129/修复版',
15+
author: 'EylinSir',
1616
title: '集百动漫',
17-
host: 'http://www.jibai5.com',
18-
url: '/vodtype/fyclass-fypage.html',
17+
host: 'http://www.duanjux.com',
18+
url: '/bm/fyclass/fypage.html',
1919
searchUrl: '/vodsearch/-------------.html?wd=**',
2020
homeUrl: '/',
2121
headers: {'User-Agent': 'UC_UA'},
22-
searchable: 1, quickSearch: 0, filterable: 0, double: true, play_parse: true, limit: 6,
23-
class_name: '3D动漫&动漫&沙雕剧场',
22+
searchable: 1,
23+
quickSearch: 0,
24+
filterable: 0,
25+
double: true,
26+
play_parse: true,
27+
limit: 6,
28+
class_name: '3D国漫&动漫&沙雕剧场',
2429
class_url: '20&21&22',
2530
lazy: async function () {
26-
let {input, pdfa, pdfh, pd} = this
27-
const html = JSON.parse((await request(input)).content.match(/player_.*?=(.*?)</)[1]);
28-
let url = html.url;
29-
if (html.encrypt == "1") {
30-
url = unescape(url)
31-
} else if (html.encrypt == "2") {
32-
url = unescape(base64Decode(url))
31+
let html = await request(this.input);
32+
let url = this.pdfh(html, 'iframe&&src') || this.input;
33+
if (url.includes("player.bilibili") && url.includes("aid=")) {
34+
url = "https://www.bilibili.com/video/av" + url.match(/aid=(\d+)/)[1];
3335
}
34-
// 处理 iframe 链接,特别是 Bilibili 播放器
35-
if (url.includes("player.bilibili.com") || url.includes("iframe")) {
36-
// 对于 Bilibili iframe,提取 aid 参数并构建视频页面链接
37-
if (url.includes("player.bilibili.com")) {
38-
const aidMatch = url.match(/aid=(\d+)/);
39-
if (aidMatch) {
40-
url = `https://www.bilibili.com/video/av${aidMatch[1]}/`;
41-
}
42-
}
43-
return {parse: 1, url: url}
44-
}
45-
return {parse: 0, url: url}
36+
let jx = /iqiyi|qq\.com|youku|mgtv|sohu|bilibili|1905|pptv/.test(url) ? 1 : 0;
37+
return {parse: 1, jx: jx, url: url};
4638
},
4739
推荐: async function () {
4840
let {input, pdfa, pdfh, pd} = this;
4941
let html = await request(input);
5042
let d = [];
51-
let data = pdfa(html, '.boxlist li');
43+
let data = pdfa(html, '.post-item');
5244
data.forEach((it) => {
5345
d.push({
54-
title: pdfh(it, 'a&&title'),
55-
pic_url: pd(it, 'img&&src'),
56-
desc: pdfh(it, '.duration&&Text'),
57-
url: pd(it, 'a&&href'),
46+
title: pdfh(it, '.post-item-title&&Text'),
47+
pic_url: pd(it, '.post-item-cover img&&src'),
48+
desc: pdfh(it, '.post-item-summary&&Text'),
49+
url: pd(it, '.post-item-img&&href'),
5850
})
5951
});
6052
return setResult(d)
@@ -63,13 +55,13 @@ var rule = {
6355
let {input, pdfa, pdfh, pd} = this;
6456
let html = await request(input);
6557
let d = [];
66-
let data = pdfa(html, '.boxlist li');
58+
let data = pdfa(html, '.post-item');
6759
data.forEach((it) => {
6860
d.push({
69-
title: pdfh(it, 'a&&title'),
70-
pic_url: pd(it, 'img&&src'),
71-
desc: pdfh(it, '.duration&&Text'),
72-
url: pd(it, 'a&&href'),
61+
title: pdfh(it, '.post-item-title&&Text'),
62+
pic_url: pd(it, '.post-item-cover img&&src'),
63+
desc: pdfh(it, '.post-item-summary&&Text'),
64+
url: pd(it, '.post-item-img&&href'),
7365
})
7466
});
7567
return setResult(d)
@@ -78,23 +70,20 @@ var rule = {
7870
let {input, pdfa, pdfh, pd} = this;
7971
let html = await request(input);
8072
let VOD = {};
81-
VOD.vod_name = pdfh(html, 'h2&&Text');
82-
VOD.vod_content = pdfh(html, '.juqing.mbyc&&Text');
83-
let playlist = pdfa(html, '.dslist-group')
84-
let tabs = pdfa(html, '.panel-default&&.panel-heading');
73+
const postContent = pdfa(html, '.post-content')[0];
74+
const contentText = pdfh(postContent, 'Text');
75+
const nameMatch = contentText.match(/(.*?)/);
76+
VOD.vod_name = nameMatch ? nameMatch[1] : pdfh(html, 'title&&Text').replace(/_.*/, '');
77+
VOD.vod_content = pdfh(postContent, 'Text');
78+
const playListDiv = pdfa(html, '.block-wrap#divTags')[0];
79+
const playItems = pdfa(playListDiv, 'ul li a');
8580
let playmap = {};
86-
tabs.map((item, i) => {
87-
const form = pdfh(item, 'Text')
88-
const list = playlist[i]
89-
const a = pdfa(list, 'body&&a')
90-
a.map((it) => {
91-
let title = pdfh(it, 'a&&title')
92-
let urls = pd(it, 'a&&href', input)
93-
if (!playmap.hasOwnProperty(form)) {
94-
playmap[form] = [];
95-
}
96-
playmap[form].push(title + "$" + urls);
97-
});
81+
let form = '集百动漫';
82+
playmap[form] = [];
83+
playItems.forEach((it) => {
84+
let title = pdfh(it, 'a&&title');
85+
let urls = pd(it, 'a&&href', input);
86+
playmap[form].push(title + "$" + urls);
9887
});
9988
VOD.vod_play_from = Object.keys(playmap).join('$$$');
10089
const urls = Object.values(playmap);
@@ -108,16 +97,16 @@ var rule = {
10897
let {input, pdfa, pdfh, pd} = this;
10998
let html = await request(input);
11099
let d = [];
111-
let data = pdfa(html, '.boxlist li');
100+
let data = pdfa(html, '.post-item');
112101
data.forEach((it) => {
113102
d.push({
114-
title: pdfh(it, 'a&&title'),
115-
pic_url: pd(it, 'img&&src'),
116-
desc: pdfh(it, '.duration&&Text'),
117-
url: pd(it, 'a&&href'),
118-
content: pdfh(it, '.list-content&&Text'),
103+
title: pdfh(it, '.post-item-title&&Text'),
104+
pic_url: pd(it, '.post-item-cover img&&src'),
105+
desc: pdfh(it, '.post-item-summary&&Text'),
106+
url: pd(it, '.post-item-img&&href'),
107+
content: pdfh(it, '.post-item-summary&&Text'),
119108
})
120109
});
121110
return setResult(d)
122111
}
123-
}
112+
}

0 commit comments

Comments
 (0)