Skip to content

Commit d73a7a4

Browse files
authored
Merge pull request #63 from EylinSir/main
新增升级部分源,剔除失效源
2 parents 46e0b73 + 2b3e2a7 commit d73a7a4

20 files changed

+229
-527
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,4 @@ dist
160160
/scripts/test/rsa-test.json
161161
/apps/salary/
162162
/jx/_30wmv.js
163+
.DS_Store

jx/JSON合集.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async function lazy(input, params) {
6464
* 包含多个备用解析接口,提高解析成功率
6565
*/
6666
let parse_list = [
67-
"https://zy.qiaoji8.com/gouzi.php?url=", // 主要解析接口
67+
"https://kalbim.xatut.top/kalbim2025/781718/play/video_player.php?url=", // 主要解析接口
6868
"http://1.94.221.189:88/algorithm.php?url=" // 备用解析接口
6969
]
7070

jx/json1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async function lazy(input, params) {
8282
let timeout = 8000; // 设置请求超时时间为8秒
8383

8484
// 调用第三方解析API获取视频直链
85-
let obj = await requestJson('https://cdnsrc.cdnapi.top/json/?url=' + input, {headers, timeout});
85+
let obj = await requestJson('https://kalbim.xatut.top/kalbim2025/781718/play/video_player.php?url=' + input, {headers, timeout});
8686

8787
return obj.url // 返回解析后的视频播放链接
8888
}

jx/web1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const jx = {
6363
* 添加url属性直接暴露api,不走系统。建议web解析才写这个属性,json解析隐藏起来
6464
* @type {string}
6565
*/
66-
url: 'https://bfq.cfwlgzs.cn/player?url=',
66+
url: 'https://www.ckplayer.vip/jiexi/?url=',
6767
};
6868

6969
/**

public/sub/order_common.example.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
豆瓣
12
设置中心
23
番茄小说
34
腾云驾雾
45
央视大全
6+
短剧聚合
57
IPTV
68
[优]
79
[盘]

spider/js/去读书[书].js

Lines changed: 55 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -26,100 +26,72 @@ var rule = {
2626
filterable: 0,
2727
timeout: 10000,
2828
play_parse: true,
29-
headers: {
30-
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36'
31-
},
32-
request: async function (url, obj) {
33-
obj = obj || {};
34-
try {
35-
const response = await _fetch(url, {
36-
method: obj.method || 'GET',
37-
headers: obj.headers || this.headers
38-
});
39-
return response.text();
40-
} catch (err) {
41-
return '';
42-
}
43-
},
44-
29+
headers: { 'User-Agent': 'MOBILE_UA' },
30+
4531
一级: async function () {
4632
let {input, pdfa, pdfh, pd} = this;
47-
let url = input.startsWith('http') ? input : this.host + '/book/' + input + '/0/1.html';
48-
let html = await this.request(url);
33+
let url = input.startsWith('http') ? input : `${this.host}/book/${input}/0/1.html`;
34+
let html = await request(url);
4935
let d = [];
5036
let items = pdfa(html, '.blockcontent .c_row') || pdfa(html, '.c_row') || [];
5137
for (let item of items) {
5238
let title = pdfh(item, '.c_subject a:eq(1)&&Text');
53-
let itemUrl = pd(item, '.c_subject a:eq(1)&&href');
54-
if (!title || !itemUrl) continue;
55-
let remarks = pdfh(item, '.c_tag span:eq(1)&&Text') || '';
56-
let pic = pd(item, 'img&&src') || '';
57-
let content = pdfh(item, '.c_description&&Text') || '';
39+
let url = pd(item, '.c_subject a:eq(1)&&href');
40+
if (!title || !url) continue;
5841
d.push({
59-
title: title,
60-
url: itemUrl,
61-
desc: remarks,
62-
pic_url: pic,
63-
content: content,
42+
title,
43+
url,
44+
desc: pdfh(item, '.c_tag span:eq(1)&&Text') || '',
45+
pic_url: pd(item, 'img&&src') || '',
46+
content: pdfh(item, '.c_description&&Text') || '',
6447
});
6548
}
6649
return setResult(d);
6750
},
6851

6952
二级: async function () {
7053
let {input, pdfa, pdfh, pd} = this;
71-
let html = await this.request(input);
72-
let VOD = {};
73-
VOD.vod_name = pdfh(html, '[property="og:novel:book_name"]&&content') || '';
74-
VOD.type_name = '';
75-
VOD.vod_pic = pd(html, '.divbox.cf img&&src') || '';
76-
VOD.vod_content = pdfh(html, '.tabcontent .tabvalue:eq(0)&&Text') || '';
77-
VOD.vod_remarks = pdfh(html, 'h3 a&&Text') || '';
78-
VOD.vod_year = '';
79-
VOD.vod_area = '';
80-
VOD.vod_actor = pdfh(html, '[property="og:novel:author"]&&content') || '';
81-
VOD.vod_director = VOD.vod_actor;
82-
VOD.vod_play_from = '去读书网';
83-
let toc_url = pd(html, 'a:contains(点击阅读)&&href') || '';
84-
if (toc_url && !toc_url.startsWith('http')) {
85-
toc_url = this.host + toc_url;
86-
}
87-
let toc_html = toc_url ? await this.request(toc_url) : '';
54+
let html = await request(input);
55+
let VOD = {
56+
vod_name: pdfh(html, '[property="og:novel:book_name"]&&content') || '',
57+
vod_pic: pd(html, '.divbox.cf img&&src') || '',
58+
vod_content: pdfh(html, '.tabcontent .tabvalue:eq(0)&&Text') || '',
59+
vod_remarks: pdfh(html, 'h3 a&&Text') || '',
60+
vod_actor: pdfh(html, '[property="og:novel:author"]&&content') || '',
61+
vod_play_from: '去读书网'
62+
};
63+
VOD.vod_director = VOD.vod_actor; // 复用作者信息
64+
let tocUrl = pd(html, 'a:contains(点击阅读)&&href') || '';
65+
tocUrl = tocUrl && !tocUrl.startsWith('http') ? `${this.host}${tocUrl}` : tocUrl;
66+
let tocHtml = tocUrl ? await request(tocUrl) : '';
8867
let chapters = [];
89-
let chapterItems = pdfa(toc_html, '.index li') || [];
90-
for (let chapter of chapterItems) {
91-
let title = pdfh(chapter, 'a&&Text');
92-
let chapter_url = pd(chapter, 'a&&href');
93-
if (!title || !chapter_url) continue;
94-
if (!chapter_url.startsWith('http')) {
95-
chapter_url = this.host + chapter_url;
96-
}
97-
chapters.push(title + '$' + chapter_url);
68+
let chs = pdfa(tocHtml, '.index li') || [];
69+
for (let ch of chs) {
70+
let title = pdfh(ch, 'a&&Text');
71+
let chUrl = pd(ch, 'a&&href');
72+
if (!title || !chUrl) continue;
73+
chUrl = chUrl.startsWith('http') ? chUrl : `${this.host}${chUrl}`;
74+
chapters.push(`${title}$${chUrl}`);
9875
}
9976
VOD.vod_play_url = chapters.join('#');
10077
return VOD;
10178
},
10279

10380
搜索: async function () {
104-
let {KEY, pdfa, pdfh, pd} = this;
105-
let url = this.host + this.searchUrl.replace('**', encodeURIComponent(KEY));
106-
let html = await this.request(url);
107-
if (!html) {
108-
url = this.host + '/modules/article/search.php?q=' + encodeURIComponent(KEY);
109-
html = await this.request(url);
110-
}
81+
let {input, pdfa, pdfh, pd} = this;
82+
let html = await request(input);
11183
let d = [];
11284
let items = pdfa(html, '#jieqi_page_contents .c_row') || [];
11385
for (let item of items) {
11486
let title = pdfh(item, '.c_subject a&&Text');
115-
let itemUrl = pd(item, '.c_subject a&&href');
116-
if (!title || !itemUrl) continue;
117-
itemUrl = itemUrl.startsWith('http') ? itemUrl : this.host + itemUrl;
87+
let url = pd(item, '.c_subject a&&href');
88+
if (!title || !url) continue;
89+
url = url.startsWith('http') ? url : `${this.host}${url}`;
11890
let pic = pd(item, 'img&&src') || '';
119-
pic = pic.startsWith('http') ? pic : this.host + pic;
91+
pic = pic.startsWith('http') ? pic : `${this.host}${pic}`;
12092
d.push({
121-
title: title,
122-
url: itemUrl,
93+
title,
94+
url,
12395
desc: pdfh(item, '.c_tag span:eq(1)&&Text') || '',
12496
pic_url: pic,
12597
content: '',
@@ -130,26 +102,28 @@ var rule = {
130102

131103
lazy: async function () {
132104
let {input, pdfh} = this;
133-
let html = await this.request(input);
105+
let html = await request(input);
134106
let title = pdfh(html, 'h1&&Text') || '';
135107
let content = pdfh(html, '#acontent&&Html') || '';
136108
if (content) {
137-
content = content.replace(/<script[^>]*?>.*?<\/script>/gs, '')
138-
.replace(/<\/p>/g, '\n\n')
139-
.replace(/<br[^>]*?>/g, '\n')
140-
.replace(/<[^>]*?>/g, '')
141-
.replace(/.*| www\.qudushu\.la|.*便/g, '')
142-
.replace(/[()]/g, '')
143-
.replace(/&nbsp;/g, ' ')
144-
.replace(/[ \t]+/g, ' ')
145-
.replace(/\n[ \t]+|[ \t]+\n/g, '\n')
146-
.replace(/\n+/g, '\n\n')
147-
.trim();
109+
const replaceRules = [
110+
[/<script[^>]*?>[\s\S]*?<\/script>/gi, ''],
111+
[/<\/p>|<br\s*\/?>/g, '\n'],
112+
[/<[^>]*?>/g, ''],
113+
[/.*| www\.qudushu\.la|.*便/g, ''],
114+
[/&nbsp;|[ \t]+/g, ' '],
115+
[/\n[ \t]*\n+/g, '\n']
116+
];
117+
replaceRules.forEach(([reg, val]) => content = content.replace(reg, val));
118+
content = content.trim();
119+
if (content.startsWith(title)) {
120+
content = content.replace(title, '').trim();
121+
}
148122
}
149123
return {
150124
parse: 0,
151-
url: 'novel://' + JSON.stringify({title, content}),
125+
url: `novel://${JSON.stringify({title, content})}`,
152126
js: ''
153127
};
154128
}
155-
};
129+
};

spider/js/可可影视.js

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)