mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-29 07:27:22 +08:00
feat: update bookwalkertw (#7657)
This commit is contained in:
@@ -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()}<br><img src="https://image.bookwalker.com.tw/upload/product/${bookid}/zoom_big_${bookid}.jpg">`,
|
||||
|
||||
Reference in New Issue
Block a user