fix: replace curl_cffi with scrapling in codeforces metadata

Problem: `codeforces.py` used `curl_cffi` to bypass Cloudflare when
fetching contest problem HTML, making it unavailable in the nix python
env and requiring an extra dependency.

Solution: rewrite `_fetch_problems_html` to use scrapling
`StealthySession` with `solve_cloudflare=True`, matching the existing
CF submit pattern. Extend `needs_browser` in `scraper.lua` to route CF
`metadata` and `tests` through the FHS env on NixOS. Remove `curl-cffi`
from `pyproject.toml`, `flake.nix`, and test mocks.
This commit is contained in:
Barrett Ruth 2026-03-06 13:18:06 -05:00
parent 543480a4fe
commit 297c71e7c7
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
5 changed files with 30 additions and 35 deletions

View file

@ -8,7 +8,6 @@ dependencies = [
"backoff>=2.2.1",
"beautifulsoup4>=4.13.5",
"scrapling[fetchers]>=0.4",
"curl-cffi>=0.13.0",
"httpx>=0.28.1",
"ndjson>=0.3.1",
"pydantic>=2.11.10",