Skip to content

Commit 75fb2c8

Browse files
author
Taois
committed
add: 新增番茄漫画
1 parent c105d0f commit 75fb2c8

File tree

2 files changed

+113
-1
lines changed

2 files changed

+113
-1
lines changed

spider/js/番茄小说[书].js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var rule = {
3131
homeUrl: 'https://fanqienovel.com/api/author/book/category_list/v0/',
3232
url: '/api/author/library/book_list/v0/?page_count=18&page_index=(fypage-1)&gender=1&category_id=fyclass&creation_status=-1&word_count=-1&book_type=-1&sort=0#fyfilter',
3333
// searchUrl: fqweb_host + '/search?query=**&page=fypage',
34-
searchUrl: fqweb_host + '/api/search?key=**&tab_type=3&offset=0&page=fypage',
34+
searchUrl: fqweb_host + '/api/search?key=**&tab_type=3&offset=((fypage-1)*10)',
3535
searchable: 2,
3636
quickSearch: 0,
3737
filterable: 1,

spider/js/番茄漫画[画].js

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/*
2+
@header({
3+
searchable: 1,
4+
filterable: 0,
5+
quickSearch: 0,
6+
title: '番茄漫画',
7+
'类型': '漫画',
8+
lang: 'ds'
9+
})
10+
*/
11+
12+
var rule = {
13+
类型: '漫画',
14+
title: '番茄漫画',
15+
host: 'https://qkfqapi.vv9v.cn',
16+
url: '',
17+
searchUrl: '/api/search?key=**&tab_type=8&offset=((fypage-1)*10)',
18+
detailUrl: '/api/detail?book_id=fyid',
19+
headers: {'User-Agent': 'UC_UA'},
20+
searchable: 1,
21+
quickSearch: 0,
22+
filterable: 0,
23+
double: true,
24+
play_parse: true,
25+
limit: 12,
26+
// class_parse: async function () {
27+
// let {input, pdfa, pdfh, pd} = this;
28+
// return {}
29+
// },
30+
lazy: async function () {
31+
let {input, pdfa, pdfh} = this;
32+
let title = input.split('@')[1];
33+
input = input.split('@')[0];
34+
let content_url = `https://qkfqapi.vv9v.cn/api/content?tab=漫画&item_id=${input}&show_html=0`; // 正文获取接口
35+
let jsonStr = await request(content_url);
36+
let images = jsonStr.parseX.data.images;
37+
images = pdfa(images, 'img');
38+
let pics = []
39+
for (let img of images) {
40+
let pic = pdfh(img, 'img&&src');
41+
pics.push(pic);
42+
}
43+
return {parse: 0, url: 'pics://' + pics.join('&&')}
44+
},
45+
推荐: async function () {
46+
return [{
47+
vod_id: 'only_search',
48+
vod_name: '纯搜索源哦!',
49+
vod_tag: 'action',
50+
vod_pic: this.publicUrl + '/images/icon_cookie/搜索.jpg'
51+
}];
52+
},
53+
一级: async function () {
54+
return [];
55+
},
56+
二级: async function () {
57+
let {input, orId} = this;
58+
// log('input', input);
59+
// log('orId', orId);
60+
let html = await request(input);
61+
let json = JSON.parse(html);
62+
let data = json.data.data;
63+
let VOD = {};
64+
VOD.vod_name = data.book_name;
65+
VOD.type_name = data.category;
66+
VOD.vod_pic = data.thumb_url;
67+
VOD.vod_content = data.abstract;
68+
VOD.vod_remarks = data.sub_info;
69+
VOD.vod_year = '';
70+
VOD.vod_area = '';
71+
VOD.vod_actor = '';
72+
VOD.vod_director = data.author;
73+
VOD.vod_play_from = '番茄漫画';
74+
let jsonStr = await request(`https://qkfqapi.vv9v.cn/api/book?book_id=${orId}`);
75+
let book_info = jsonStr.parseX.data.data;
76+
let list = book_info.chapterListWithVolume.flat();
77+
let urls = [];
78+
list.forEach((it, index) => {
79+
urls.push(it.title + '$' + it.itemId + '@' + it.title);
80+
});
81+
VOD.vod_play_url = urls.join('#');
82+
return VOD
83+
},
84+
搜索: async function () {
85+
let {input, MY_PAGE} = this;
86+
// if (Number(MY_PAGE) > 1) {
87+
// return []
88+
// }
89+
print(input)
90+
let html = await request(input);
91+
let json = JSON.parse(html);
92+
let data = json.data.search_tabs[3].data;
93+
let d = [];
94+
for (let it of data.filter(i => i.book_data)) {
95+
let book = it.book_data[0];
96+
// console.log(book)
97+
d.push({
98+
title: book.book_name,
99+
url: book.book_id,
100+
desc: book.author,
101+
content: book.book_abstract || book.abstract,
102+
pic_url: book.thumb_url
103+
});
104+
}
105+
return setResult(d)
106+
},
107+
action: async function (action, value) {
108+
if (action === 'only_search') {
109+
return '此源为纯搜索源,你直接全局搜索这个源或者使用此页面的源内搜索就好了'
110+
}
111+
}
112+
}

0 commit comments

Comments
 (0)