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()}
`,