Skip to content

Commit 91cd129

Browse files
sirius60111claude
andauthored
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>
1 parent bf8e64e commit 91cd129

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/routes/xueqiu/today.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const route: Route = {
1414
features: {
1515
requireConfig: false,
1616
requirePuppeteer: false,
17-
antiCrawler: false,
17+
antiCrawler: true,
1818
supportBT: false,
1919
supportPodcast: false,
2020
supportScihub: false,
@@ -35,7 +35,7 @@ async function handler(ctx) {
3535

3636
const rootUrl = 'https://xueqiu.com';
3737
const currentUrl = `${rootUrl}/today`;
38-
const apiUrl = `${rootUrl}/statuses/hot/listV2.json?since_id=-1&size=${size}`;
38+
const apiUrl = `https://api.xueqiu.com/statuses/hot/listV2.json?since_id=-1&size=${size}`;
3939

4040
const token = await parseToken(currentUrl);
4141
const response = await got({

0 commit comments

Comments
 (0)