Skip to content

fix(v2ex): fetch hot topics through browser context#493

Merged
jackwener merged 2 commits intojackwener:mainfrom
huguoliang1314:feature/v2ex-hot-bugfix
Mar 27, 2026
Merged

fix(v2ex): fetch hot topics through browser context#493
jackwener merged 2 commits intojackwener:mainfrom
huguoliang1314:feature/v2ex-hot-bugfix

Conversation

@huguoliang1314
Copy link
Contributor

@huguoliang1314 huguoliang1314 commented Mar 27, 2026

Summary

  • switch v2ex hot from direct non-browser fetch to browser-context API access
  • open a normal V2EX page first, then fetch /api/topics/hot.json inside the page context
  • avoid coupling the command to the API page rendering details

Why

V2EX is rate-limiting or blocking direct API access from the non-browser path, while requests issued inside a real browser session still succeed.

Validation

  • rebased onto latest origin/main
  • reviewed the final YAML pipeline logic
  • GitHub checks were not reported on this PR branch at review time

@huguoliang1314
Copy link
Contributor Author

如题,解决v2ex热榜接口风控问题。
测试用例我看了,热榜问题已经解决。
其它几个错误,和我这边修改无关,应该是被风控了。
✓ v2ex hot returns topics ✅ (你的修改)
× v2ex latest returns topics ❌ (不是你的修改)
× bloomberg * (8个失败) ❌ (不是你的修改)
× imdb top ❌ (不是你的修改)

@jackwener jackwener force-pushed the feature/v2ex-hot-bugfix branch from 34136d0 to e6a5da8 Compare March 27, 2026 09:47
@jackwener jackwener changed the title v2ex的API访问不了,被风控了。但是若用浏览器访问接口,是可以的。 fix(v2ex): fetch hot topics through browser context Mar 27, 2026
@jackwener jackwener merged commit a2d1199 into jackwener:main Mar 27, 2026
23 checks passed
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.

2 participants