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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

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) => ({