From b5ca6d032b8cebcebe255b428ec0d33edce83f40 Mon Sep 17 00:00:00 2001 From: wushijishan <65406369+wushijishan@users.noreply.github.com> Date: Mon, 26 Oct 2020 01:44:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20BOOKWALKERTW=E3=80=81=E4=BA=8C=E6=9F=84A?= =?UTF-8?q?PP=E5=9B=BE=E7=89=87=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF=20(#59?= =?UTF-8?q?99)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: codefactor-io Co-authored-by: Henry Wang --- lib/routes/bookwalkertw/news.js | 2 +- lib/routes/erbingapp/news.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/routes/bookwalkertw/news.js b/lib/routes/bookwalkertw/news.js index 6e7a0dda60..785acd0d02 100644 --- a/lib/routes/bookwalkertw/news.js +++ b/lib/routes/bookwalkertw/news.js @@ -20,7 +20,7 @@ module.exports = async (ctx) => { list .map((index, item) => { item = $(item); - bookid = item.find('a').attr('href').substring(38, 43); + bookid = item.find('a').attr('href').split('/')[4]; return { title: item.find('.bookname').text(), description: `${item.find('.booknamesub').text()} | ${item.find('.bprice').text()}
`, diff --git a/lib/routes/erbingapp/news.js b/lib/routes/erbingapp/news.js index 9bfea1af82..868b126e27 100644 --- a/lib/routes/erbingapp/news.js +++ b/lib/routes/erbingapp/news.js @@ -17,6 +17,8 @@ module.exports = async (ctx) => { let description = item.content; if (item.video_img !== null) { description += `
`; + } else if (item.acontent.indexOf('104129') !== -1) { + description += `
`; } else { const imgs = item.acontent.split(','); for (let i = 0; i < imgs.length; i++) {