From 8f51bbbe782fd468aa7a44461767d3748b6799ec Mon Sep 17 00:00:00 2001 From: Huiru <31591278+HuiruDong@users.noreply.github.com> Date: Fri, 18 Oct 2019 14:41:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=9A=E7=9F=A5?= =?UTF-8?q?=E7=BD=91=E5=86=85=E5=AE=B9=E8=8E=B7=E5=8F=96=20(#3282)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/duozhi/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/routes/duozhi/index.js b/lib/routes/duozhi/index.js index cbf7b5c4fb..03afd818aa 100644 --- a/lib/routes/duozhi/index.js +++ b/lib/routes/duozhi/index.js @@ -4,16 +4,14 @@ const cheerio = require('cheerio'); module.exports = async (ctx) => { const response = await got('http://www.duozhi.com/'); const $ = cheerio.load(response.data); - const postList = $('.post-list .post').get(); + const postList = $('.list-post .post-item').get(); const result = await Promise.all( postList.map(async (item) => { const title = $(item) .find('.post-title') - .find('a') .text(); const link = $(item) .find('.post-title') - .find('a') .attr('href'); const guid = link; @@ -41,8 +39,9 @@ module.exports = async (ctx) => { .replace(/alt="\\"/g, ''); single.pubDate = new Date( $(temp.data) - .find('.meta-date') + .find('.subject-meta') .text() + .trim() .substr(0, 18) ).toUTCString();