fix: 财联社头条未推送 (#5154)

This commit is contained in:
Ethan Shen 2020-07-09 10:53:22 +08:00 committed by GitHub
parent a390286fac
commit 8efdffa781
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -26,12 +26,20 @@ module.exports = async (ctx) => {
url: link,
});
const list = response.data.data.depth_list.map((item) => ({
let list = response.data.data.depth_list.map((item) => ({
title: item.title || item.brief,
link: `https://www.cls.cn/detail/${item.id}`,
pubDate: new Date(item.ctime * 1000).toUTCString(),
}));
list = list.concat(
response.data.data.top_article.map((item) => ({
title: item.title || item.brief,
link: `https://www.cls.cn/detail/${item.id}`,
pubDate: new Date(item.ctime * 1000).toUTCString(),
}))
);
const items = await Promise.all(
list.map(
async (item) =>