Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

起点的源没效果,笔趣阁报网络错误502 #156

Closed
guozefan opened this issue Dec 12, 2023 · 5 comments
Closed

起点的源没效果,笔趣阁报网络错误502 #156

guozefan opened this issue Dec 12, 2023 · 5 comments

Comments

@guozefan
Copy link

4ca2e0ad5752cddb83316727b0e8963
切换成起点的源,搜索完没反应
切换成笔趣阁,搜索完报网络错误502
在线等摸鱼,求楼主早日修复,让百万摸鱼大军顺利上线

@dr110297
Copy link

+1

@smileqwe
Copy link

起点页面更新了 作者没跟进,爬虫失败了

@1394225561
Copy link

有新的可用的笔趣阁源地址嘛 在线等 急

@aooiuu
Copy link
Owner

aooiuu commented Dec 27, 2023

年后会更新。新版本会支持自定义源

@aooiuu aooiuu closed this as completed Dec 27, 2023
@shakingbabygg
Copy link

筆趣閣的 手動換了個源,大家將就著用吧,剩下等作者更新了
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator"throw"); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.readerDriver = void 0;
const cheerio = require("cheerio");
const iconv = require('iconv-lite');
const request_1 = require("../../../utils/request");
const TreeNode_1 = require("../../../explorer/TreeNode");
const DOMAIN = 'http://www.biqu520.net';
class ReaderDriver {
hasChapter() {
return true;
}
search(keyword) {
return __awaiter(this, void 0, void 0, function* () {
const result = [];
try {
//const res = yield request_1.default.send(DOMAIN + '/modules/article/search.php?searchkey=' + encodeURI(keyword));
const res = yield request_1.default.send({
url: DOMAIN + '/modules/article/search.php?searchkey=' + encodeURI(keyword),
responseType: 'buffer'
});
const html2 = iconv.decode(res.body, 'gb2312');
const $ = cheerio.load(html2);
$('.grid tbody > tr').each(function (i, elem) {
const title = $(elem).find('td:nth-child(1)').text();
const author = $(elem).find('td:nth-child(3)').text();
const path = $(elem).find('td:nth-child(1)').find('a').attr('href');
if (title && author) {
result.push(new TreeNode_1.TreeNode(Object.assign({}, TreeNode_1.defaultTreeNode, {
type: '.biquge',
name: ${title} - ${author},
isDirectory: true,
path
})));
}
});
}
catch (error) {
console.warn(error);
}
return result;
});
}
getChapter(pathStr) {
return __awaiter(this, void 0, void 0, function* () {
const result = [];
try {
const res = yield request_1.default.send({
url:DOMAIN + pathStr,
responseType: 'buffer'
});
const html2 = iconv.decode(res.body, 'gb2312');
const $ = cheerio.load(html2);
$('#list dd').each(function (i, elem) {
const name = $(elem).find('a').text();
const path = $(elem).find('a').attr().href;
result.push(new TreeNode_1.TreeNode(Object.assign({}, TreeNode_1.defaultTreeNode, {
type: '.biquge',
name,
isDirectory: false,
path: path
})));
});
}
catch (error) {
console.warn(error);
}
return result;
});
}
getContent(pathStr) {
return __awaiter(this, void 0, void 0, function* () {
let result = '';
try {
const res = yield request_1.default.send({
url:DOMAIN + pathStr,
responseType: 'buffer'
});
const html2 = iconv.decode(res.body, 'gb2312');
const $ = cheerio.load(html2);
const html = $('#content').html();
result = html ? html: '';
}
catch (error) {
console.warn(error);
}
return result;
});
}
}
exports.readerDriver = new ReaderDriver();
//# sourceMappingURL=index.js.map

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants