From f08633f8fa1e7ae2ccc753bcf644e79642af2d32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=89=E5=87=89?= Date: Fri, 7 Dec 2018 18:41:00 +0800 Subject: [PATCH] Hotfix: thepaper unknown title (#1241) Closes #1240 --- routes/thepaper/featured.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routes/thepaper/featured.js b/routes/thepaper/featured.js index 7fe416800..8f167da0f 100644 --- a/routes/thepaper/featured.js +++ b/routes/thepaper/featured.js @@ -37,7 +37,9 @@ module.exports = async (ctx) => { const content = cheerio.load(res.data); const serverOffset = new Date().getTimezoneOffset() / 60; const single = { - title: content('h1').text(), + title: $(item) + .find('a') + .text(), guid: itemUrl, link: itemUrl.replace('https://m.', 'https://'), description: content('#v3cont_id > div.news_content > div.news_part_father > div > div:nth-child(1)').html(),