From ee680ddf3f614a6b0857b381df7485d57a8eab47 Mon Sep 17 00:00:00 2001 From: WenryXu Date: Wed, 22 May 2019 10:51:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E5=B0=8F=E9=BB=91?= =?UTF-8?q?=E7=9B=92=E6=B8=B8=E6=88=8F=E6=96=B0=E9=97=BB=E5=85=A8=E6=96=87?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E5=9B=BE=E7=89=87=20(#2189?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/xiaoheihe/news.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/routes/xiaoheihe/news.js b/lib/routes/xiaoheihe/news.js index 469bf1b0f..bfdfdca86 100644 --- a/lib/routes/xiaoheihe/news.js +++ b/lib/routes/xiaoheihe/news.js @@ -32,7 +32,9 @@ module.exports = async (ctx) => { }); // 解析html内容 const $ = cheerio.load(article.data); - const content = $('.article-content').html(); + const content = $('.article-content') + .html() + .replace(/data-original/g, 'src'); // 存放到缓存区 ctx.cache.set(cacheKey, content); news.description = content;