fix(route): 东方网-上海新闻 (#8523)

Close #7736 Close #7983
This commit is contained in:
Jin 2022-02-02 03:41:04 +08:00 committed by GitHub
parent c2a886f91d
commit d2f4a5620a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 12 deletions

View File

@ -6,24 +6,16 @@ module.exports = async (ctx) => {
const domain = 'http://wap.eastday.com';
const response = await got({
method: 'post',
url: `https://apin.eastday.com/api/news/list`,
json: {
channelId: '15',
currentPage: 1,
pageSize: 20,
appId: '190504',
deviceId: '00000000',
version: '0.0.0.2',
},
method: 'get',
url: `https://apin.eastday.com/apiplus/special/specialnewslistbyurl?specialUrl=1632798465040016&skipCount=0&limitCount=20`,
});
const result = await Promise.all(
response.data.list.map(async (item) => {
response.data.data.list.map(async (item) => {
const link = item.url;
const entity = {
title: item.title,
description: item.abstracts + '...',
description: item.abstracts,
pubDate: new Date(item.time).toUTCString(),
link,
};