Skip to content

Commit 0f351d6

Browse files
author
Taois
committed
fix:修复小说源
1 parent 9740269 commit 0f351d6

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

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

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@
1414
// http://localhost:5757/api/番茄小说[书]?wd=斩神&pg=2
1515
// http://localhost:5757/api/番茄小说[书]?play=7432172914662720025&flag=番茄小说
1616

17+
// 对接API:https://qkfqapi.vv9v.cn/docs
18+
// https://github.com/POf-L/Fanqie-novel-Downloader/blob/main/novel_downloader.py
19+
1720
const {getRandomFromList} = $.require('./_lib.random.js');
1821
const {requestHtml} = $.require('./_lib.request.js');
1922
// const fqweb_host = 'http://fqweb.jsj66.com';
20-
const fqweb_host = 'http://fanqie.mduge.com';
23+
// const fqweb_host = 'http://fanqie.mduge.com';
24+
const fqweb_host = 'https://qkfqapi.vv9v.cn';
2125

2226
var rule = {
2327
类型: '小说',
@@ -26,7 +30,8 @@ var rule = {
2630
host: 'https://fanqienovel.com/',
2731
homeUrl: 'https://fanqienovel.com/api/author/book/category_list/v0/',
2832
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',
29-
searchUrl: fqweb_host + '/search?query=**&page=fypage',
33+
// searchUrl: fqweb_host + '/search?query=**&page=fypage',
34+
searchUrl: fqweb_host + '/api/search?key=**&tab_type=3&offset=0&page=fypage',
3035
searchable: 2,
3136
quickSearch: 0,
3237
filterable: 1,
@@ -148,7 +153,7 @@ var rule = {
148153
},
149154
searchHandel: function (json) {
150155
return {
151-
data: json.data.search_tabs[0].data
156+
data: json.data.search_tabs[5].data
152157
};
153158
},
154159
搜索: async function (wd, quick, pg) {
@@ -180,7 +185,8 @@ var rule = {
180185
let content_url = ''; // 正文获取接口
181186
// content_url = `http://fqweb.jsj66.com/content?item_id=${input}`;
182187
// content_url = `https://fanqienovel.com/reader/${input}?enter_from=reader`;
183-
content_url = `${fqweb_host}/content?item_id=${input}`;
188+
// content_url = `${fqweb_host}/content?item_id=${input}`;
189+
content_url = `${fqweb_host}/api/content?tab=小说&item_id=${input}`;
184190
/*
185191
log(content_url);
186192
@@ -200,7 +206,8 @@ var rule = {
200206
*/
201207
let json = JSON.parse(html);
202208

203-
content = json.content.replace(/\n\n󠇕󠆖󠅽󠇕󠆨󠅼󠄡󠄩󠄠󠄩󠄣󠄣󠄢󠄨󠄨󠄩\n/g, "\n");
209+
// content = json.content.replace(/\n\n妍󠇕希󠆖󠅽󠇕󠆨󠅼󠄡󠄩󠄠󠄩󠄣󠄣󠄢󠄨󠄨󠄩\n/g, "\n");
210+
content = json.data.content;
204211
// print(content)
205212
let ret = JSON.stringify({
206213
title,

spider/js/顶点小说[书].js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var rule = {
2626
filter_url: '',
2727
filter_def: {},
2828
headers: {
29-
'User-Agent': 'MOBILE_UA',
29+
'User-Agent': 'PC_UA',
3030
},
3131
timeout: 5000,
3232
hikerListCol: "text_1",

0 commit comments

Comments
 (0)