fix(route): Fix xiaoheihe news (#15638)

This commit is contained in:
tssujt
2024-05-20 23:24:35 +08:00
committed by GitHub
parent 960752de59
commit 0ebe193e10
+2 -1
View File
@@ -22,9 +22,10 @@ export const route: Route = {
};
async function handler() {
const feedUrl = calculate(`https://api.xiaoheihe.cn/bbs/app/feeds/news?os_type=web&app=heybox&client_type=mobile&version=999.0.3&x_client_type=web&x_os_type=Mac&x_app=heybox&heybox_id=-1&appid=900018355&offset=0&limit=20`);
const response = await got({
method: 'get',
url: `https://api.xiaoheihe.cn/bbs/app/feeds/news?lang=zh-cn&limit=20&offset=0&tag=-1&version=1.3.303`,
url: feedUrl,
});
const data = response.data.result.links.filter((item) => item.linkid !== undefined);
let items = data.map((item) => ({