The /xueqiu/stock_info route was broken by Alibaba Cloud WAF: the cookie
acquisition could not pass the challenge, and the data request was sent
to xueqiu.com which the WAF blocks for these endpoints.
- cookies.ts: allow the `script` resource type in the page.route filter
so the WAF challenge scripts can execute, enabling cookie extraction
via Patchright
- stock-info.ts: request data from api.xueqiu.com instead of xueqiu.com
to bypass the WAF
- stock-info.ts: align the supported types with the tabs on the stock
page (all / discuss / trans / news / announcement). all / discuss /
trans use the symbol search endpoint; news / announcement use the
stock timeline endpoint. The previously broken research type is removed
- stock-info.ts: fetch the stock name from the lightweight quote API
since it is rendered client-side and cannot be scraped from the HTML
- stock-info.ts: throw InvalidParameterError for unsupported types
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>