fix thepaper featured

This commit is contained in:
DIYgod 2018-09-16 18:00:03 +08:00
parent 6eeecf0ea5
commit f90321b4f1
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
1 changed files with 9 additions and 7 deletions

View File

@ -41,13 +41,15 @@ module.exports = async (ctx) => {
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(),
pubDate: dayjs(
content('#v3cont_id > div.news_content > p:nth-child(3)')
.html()
.split(' ')[0]
)
.add(-8 - serverOffset, 'hour')
.toISOString(),
pubDate: content('#v3cont_id > div.news_content > p:nth-child(3)').html()
? dayjs(
content('#v3cont_id > div.news_content > p:nth-child(3)')
.html()
.split(' ')[0]
)
.add(-8 - serverOffset, 'hour')
.toISOString()
: null,
author: content('#v3cont_id > div.news_content > p:nth-child(2)').text(),
};
return Promise.resolve(single);