Skip to content

fix: improve news collector with xueqiu WAF bypass and eastmoney fall…#80

Open
feifeinorfly wants to merge 1 commit into
TNT-Likely:mainfrom
feifeinorfly:pr-fix-news-collector
Open

fix: improve news collector with xueqiu WAF bypass and eastmoney fall…#80
feifeinorfly wants to merge 1 commit into
TNT-Likely:mainfrom
feifeinorfly:pr-fix-news-collector

Conversation

@feifeinorfly

Copy link
Copy Markdown
  • 将雪球的httpx直接请求替换为Playwright浏览器fetch(绕过WAF/cloudflare挑战)
  • 当雪球返回空数据时,添加带有页面刷新的自动重试功能
  • 当雪球失败或cookie为空时,自动回退到东方财富网
  • 增加来源优先级排序(东财新闻 -> 东财 -> 学球)
  • 修复名称参数回退问题:当数据库中未找到时,使用股票名称作为搜索关键字
  • 增加xueqiu数据源的测试超时时间(Playwright冷启动时为90秒)

…back

- Replace httpx direct requests with Playwright browser fetch for xueqiu
  (bypasses WAF/cloudflare challenges)
- Add auto-retry with page refresh when xueqiu returns empty data
- Add automatic fallback to eastmoney when xueqiu fails or cookie is empty
- Add source priority sorting (eastmoney_news -> eastmoney -> xueqiu)
- Fix names parameter fallback: use stock name as search keyword when not
  found in database
- Increase test timeout for xueqiu datasource (90s for Playwright cold start)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant