fix: 书趣阁网站bug修复 (#2757)
* 小说阅读 添加书趣阁网站小说章节更新 * 小说阅读 添加书趣阁网站小说章节更新 更新reading.md * fix 书趣阁点击标题不跳转 * fix 标题显示错误
This commit is contained in:
@@ -139,3 +139,13 @@ pageClass: routes
|
||||
### 主页
|
||||
|
||||
<Route author="kt286" example="/zreading" path="/zreading" />
|
||||
|
||||
## 书趣阁
|
||||
|
||||
### 小说更新
|
||||
|
||||
<Route author="ActonGen" example="/novel/shuquge/8659" path="/novel/shuquge/:id" :paramsDesc="['小说 id, 可在对应小说页 URL 中找到, 例如 `8659`']">
|
||||
|
||||
举例网址:http://www.shuquge.com/txt/8659/index.html
|
||||
|
||||
</Route>
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user