From 06f97c964ca9b1bd093ff7eb0bee1d775a19f71a Mon Sep 17 00:00:00 2001
From: wushijishan <65406369+wushijishan@users.noreply.github.com>
Date: Mon, 7 Jun 2021 06:40:00 +0800
Subject: [PATCH] feat: update bookwalkertw (#7657)
---
lib/routes/bookwalkertw/news.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/routes/bookwalkertw/news.js b/lib/routes/bookwalkertw/news.js
index 785acd0d02e9a5..ce5275e731add5 100644
--- a/lib/routes/bookwalkertw/news.js
+++ b/lib/routes/bookwalkertw/news.js
@@ -4,7 +4,7 @@ const cheerio = require('cheerio');
module.exports = async (ctx) => {
const response = await got({
method: 'get',
- url: 'https://www.bookwalker.com.tw/more/index/1',
+ url: 'https://www.bookwalker.com.tw/search?order=sell_desc&series_display=1&d=1',
});
const data = response.data;
@@ -14,13 +14,13 @@ module.exports = async (ctx) => {
let bookid;
ctx.state.data = {
title: 'BOOKWALKERTW热门新书',
- link: 'https://www.bookwalker.com.tw/more/index/1',
+ link: 'https://www.bookwalker.com.tw/search?order=sell_desc&series_display=1&d=1',
item:
list &&
list
.map((index, item) => {
item = $(item);
- bookid = item.find('a').attr('href').split('/')[4];
+ bookid = item.find('img').attr('data-src').split('/')[5];
return {
title: item.find('.bookname').text(),
description: `${item.find('.booknamesub').text()} | ${item.find('.bprice').text()}
`,