fix: 修复 36kr 无法获取 #5
This commit is contained in:
parent
a646b5a649
commit
6cb7036bca
@ -46,6 +46,7 @@ krRouter.get("/36kr", async (ctx) => {
|
|||||||
siteId: 1,
|
siteId: 1,
|
||||||
platformId: 2,
|
platformId: 2,
|
||||||
},
|
},
|
||||||
|
timestamp: new Date().getTime(),
|
||||||
});
|
});
|
||||||
data = getData(response.data.data.hotRankList);
|
data = getData(response.data.data.hotRankList);
|
||||||
updateTime = new Date().toISOString();
|
updateTime = new Date().toISOString();
|
||||||
@ -84,6 +85,7 @@ krRouter.get("/36kr/new", async (ctx) => {
|
|||||||
siteId: 1,
|
siteId: 1,
|
||||||
platformId: 2,
|
platformId: 2,
|
||||||
},
|
},
|
||||||
|
timestamp: new Date().getTime(),
|
||||||
});
|
});
|
||||||
const newData = getData(response.data.data.hotRankList);
|
const newData = getData(response.data.data.hotRankList);
|
||||||
updateTime = new Date().toISOString();
|
updateTime = new Date().toISOString();
|
||||||
|
@ -21,7 +21,6 @@ const url = `https://baike.baidu.com/cms/home/eventsOnHistory/${month}.json`;
|
|||||||
// 数据处理
|
// 数据处理
|
||||||
const getData = (data) => {
|
const getData = (data) => {
|
||||||
if (!data) return [];
|
if (!data) return [];
|
||||||
console.log(data);
|
|
||||||
return data.map((v) => {
|
return data.map((v) => {
|
||||||
return {
|
return {
|
||||||
year: v.year,
|
year: v.year,
|
||||||
|
Loading…
Reference in New Issue
Block a user