From 2aff7a8e1c782583c2af16757dfacec9847e70e2 Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Mon, 4 Mar 2019 11:16:19 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20WEMP=20=E8=B7=AF=E7=94=B1=20(#1656)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/tencent/wechat/wemp.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/routes/tencent/wechat/wemp.js b/lib/routes/tencent/wechat/wemp.js index f4d09dc93..ffe88823f 100644 --- a/lib/routes/tencent/wechat/wemp.js +++ b/lib/routes/tencent/wechat/wemp.js @@ -41,16 +41,20 @@ module.exports = async (ctx) => { const article = cheerio.load(response); - return { + const single = { title: $(e) .find('.post-item__title') .text() .trim(), - link: article('.post__orilink').attr('href'), + link: article('.post__orilink') + .last() + .attr('href'), description: article('#content').html(), pubDate, author, }; + + return Promise.resolve(single); }) );