fix(route/xueqiu): fetch today hot list via api.xueqiu.com to bypass WAF (#22689)

The /xueqiu/today route requested statuses/hot/listV2.json on xueqiu.com,
which the Alibaba Cloud WAF blocks (returns a challenge page instead of
JSON), so response.data.items was undefined and the route threw 503.
Switch the endpoint to api.xueqiu.com, which serves the same JSON without
the WAF challenge. Also mark antiCrawler: true.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
sirius60111 2026-07-13 13:43:03 +08:00 committed by GitHub
parent bf8e64e484
commit 91cd129381
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ export const route: Route = {
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
antiCrawler: true,
supportBT: false,
supportPodcast: false,
supportScihub: false,
@ -35,7 +35,7 @@ async function handler(ctx) {
const rootUrl = 'https://xueqiu.com';
const currentUrl = `${rootUrl}/today`;
const apiUrl = `${rootUrl}/statuses/hot/listV2.json?since_id=-1&size=${size}`;
const apiUrl = `https://api.xueqiu.com/statuses/hot/listV2.json?since_id=-1&size=${size}`;
const token = await parseToken(currentUrl);
const response = await got({