From 406a78db02914729c3219a596df6aaa25a24a2fc Mon Sep 17 00:00:00 2001 From: ActonGen Date: Sat, 3 Aug 2019 14:01:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B9=A6=E8=B6=A3=E9=98=81=E7=BD=91?= =?UTF-8?q?=E7=AB=99bug=E4=BF=AE=E5=A4=8D=20(#2757)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 小说阅读 添加书趣阁网站小说章节更新 * 小说阅读 添加书趣阁网站小说章节更新 更新reading.md * fix 书趣阁点击标题不跳转 * fix 标题显示错误 --- docs/reading.md | 10 ++++++++++ lib/routes/novel/shuquge.js | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/reading.md b/docs/reading.md index 54201c979a..b3d423d7d6 100644 --- a/docs/reading.md +++ b/docs/reading.md @@ -139,3 +139,13 @@ pageClass: routes ### 主页 + +## 书趣阁 + +### 小说更新 + + + +举例网址:http://www.shuquge.com/txt/8659/index.html + + diff --git a/lib/routes/novel/shuquge.js b/lib/routes/novel/shuquge.js index b4641b9fd7..bdf2cffd48 100644 --- a/lib/routes/novel/shuquge.js +++ b/lib/routes/novel/shuquge.js @@ -27,7 +27,7 @@ module.exports = async (ctx) => { .find('a') .map((_, e) => ({ title: e.children[0].data, - link: e.attribs.href, + link: `${baseUrl}${id}/${e.attribs.href}`, })) .get(); @@ -40,7 +40,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', - url: `${baseUrl}${id}/${item.link}`, + url: item.link, responseType: 'buffer', }); @@ -59,7 +59,7 @@ module.exports = async (ctx) => { }) ); ctx.state.data = { - title: `笔趣阁 ${title}`, + title: `书趣阁 ${title}`, link: `${baseUrl}${id}/index.html`, image: cover_url, description: description,