fix: BOOKWALKERTW、二柄APP图片显示错误 (#5999)
Co-authored-by: codefactor-io <support@codefactor.io> Co-authored-by: Henry Wang <hi@henry.wang>
This commit is contained in:
parent
5ae2913e30
commit
b5ca6d032b
|
|
@ -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()}<br><img src="https://image.bookwalker.com.tw/upload/product/${bookid}/zoom_big_${bookid}.jpg">`,
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ module.exports = async (ctx) => {
|
|||
let description = item.content;
|
||||
if (item.video_img !== null) {
|
||||
description += `<br><img src="${item.video_img}">`;
|
||||
} else if (item.acontent.indexOf('104129') !== -1) {
|
||||
description += `<br><img src="${item.article.humb.split('?')[0]}">`;
|
||||
} else {
|
||||
const imgs = item.acontent.split(',');
|
||||
for (let i = 0; i < imgs.length; i++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue