parent
c2a886f91d
commit
d2f4a5620a
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue