We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
// const DOMAIN = 'https://www.biquge.com.cn'; const DOMAIN = 'https://www.xbiquge.la/'; // https://www.xbiquge.la/modules/article/waps.php class ReaderDriver { hasChapter() { return true; } search(keyword) { return __awaiter(this, void 0, void 0, function* () { const result = []; try { // const res = yield got(DOMAIN + '/search.php?q=' + encodeURI(keyword)); const res = yield got(DOMAIN + '/modules/article/waps.php?searchkey=' + encodeURI(keyword)) const $ = cheerio.load(res.body); $('.grid tr').each(function (i, elem) { const title = $($(elem).find('td')[0]).text(); const author = $($(elem).find('td')[2]).text(); const path = $($(elem).find('td')[0]).find('a').length > 0 ? $($(elem).find('td')[0]).find('a').attr().href : ''; result.push(new TreeNode_1.TreeNode(Object.assign({}, TreeNode_1.defaultProblem, { type: '.biquge', name: ${title} - ${author}, isDirectory: true, path }))); }); } catch (error) { console.warn(error); } return result; }); }
${title} - ${author}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
// const DOMAIN = 'https://www.biquge.com.cn';
const DOMAIN = 'https://www.xbiquge.la/';
// https://www.xbiquge.la/modules/article/waps.php
class ReaderDriver {
hasChapter() {
return true;
}
search(keyword) {
return __awaiter(this, void 0, void 0, function* () {
const result = [];
try {
// const res = yield got(DOMAIN + '/search.php?q=' + encodeURI(keyword));
const res = yield got(DOMAIN + '/modules/article/waps.php?searchkey=' + encodeURI(keyword))
const $ = cheerio.load(res.body);
$('.grid tr').each(function (i, elem) {
const title = $($(elem).find('td')[0]).text();
const author = $($(elem).find('td')[2]).text();
const path = $($(elem).find('td')[0]).find('a').length > 0 ? $($(elem).find('td')[0]).find('a').attr().href : '';
result.push(new TreeNode_1.TreeNode(Object.assign({}, TreeNode_1.defaultProblem, {
type: '.biquge',
name:
${title} - ${author}
,isDirectory: true,
path
})));
});
}
catch (error) {
console.warn(error);
}
return result;
});
}
The text was updated successfully, but these errors were encountered: