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:
parent
bf8e64e484
commit
91cd129381
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Reference in New Issue