From 5e62acee5822f880ea8c14f3583585abda24ed2d Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sat, 5 May 2018 23:44:27 +0800 Subject: [PATCH] fix zhihu zhuanlan img link, close #80 --- routes/zhihu/zhuanlan.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/routes/zhihu/zhuanlan.js b/routes/zhihu/zhuanlan.js index a04b42241..e77e9c887 100644 --- a/routes/zhihu/zhuanlan.js +++ b/routes/zhihu/zhuanlan.js @@ -31,13 +31,11 @@ module.exports = async (ctx) => { link: `https://zhuanlan.zhihu.com/${id}`, description: info.description, lastBuildDate: new Date().toUTCString(), - item: list.map((item) => { - return { - title: item.title, - description: item.content, - pubDate: new Date(item.publishedTime).toUTCString(), - link: `https://zhuanlan.zhihu.com${item.url}` - }; - }), + item: list.map((item) => ({ + title: item.title, + description: item.content.replace(/