diff --git a/lib/v2/eprice/rss.js b/lib/v2/eprice/rss.js index c2c2ec27c8..e6988c0b4b 100644 --- a/lib/v2/eprice/rss.js +++ b/lib/v2/eprice/rss.js @@ -17,9 +17,7 @@ module.exports = async (ctx) => { const items = await Promise.all( feed.items.map((item) => ctx.cache.tryGet(item.link, async () => { - const response = await got({ - method: 'get', - url: item.link, + const response = await got(item.link, { headers: { Referer: `https://www.eprice.com.${region}`, }, @@ -48,7 +46,6 @@ module.exports = async (ctx) => { art(path.join(__dirname, 'templates/image.art'), { alt: e.attr('title'), src: e.attr('href'), - title: e.attr('title'), }) ); e.remove(); @@ -57,14 +54,7 @@ module.exports = async (ctx) => { $('img').each((_, e) => { e = $(e); if (e.attr('data-original')) { - e.after( - art(path.join(__dirname, 'templates/image.art'), { - alt: e.attr('title'), - src: e.attr('data-original'), - title: e.attr('title'), - }) - ); - e.remove(); + e.attr('src', e.attr('data-original')); } }); @@ -76,10 +66,8 @@ module.exports = async (ctx) => { delete item.enclosure; delete item.isoDate; - item.description = art(path.join(__dirname, 'templates/description.art'), { - // tw || tw || hk || hk - desc: $('div.user-comment-block').html() || $('div.content').html() || $('li.inner').html() || $('div.section-content').html(), - }); + // tw || tw || hk || hk || hk + item.description = $('div.user-comment-block').html() || $('div.content').html() || $('li.inner').html() || $('div.section-content').html() || $('.article__content').html(); item.pubDate = parseDate(item.pubDate); return item; diff --git a/lib/v2/eprice/templates/description.art b/lib/v2/eprice/templates/description.art deleted file mode 100644 index 7755ee9f6b..0000000000 --- a/lib/v2/eprice/templates/description.art +++ /dev/null @@ -1 +0,0 @@ -{{@ desc }} diff --git a/lib/v2/eprice/templates/image.art b/lib/v2/eprice/templates/image.art index 1c35c564b8..0772f82ccb 100644 --- a/lib/v2/eprice/templates/image.art +++ b/lib/v2/eprice/templates/image.art @@ -1 +1,4 @@ -{{ alt }} +
+ {{ alt }} +
{{ alt }}
+