fix(browser): camoufox reads AVITO_PROXY_URL → real avito data not soft-block stub (#905) #911
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#911
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/905-browser-proxy-env"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem (found by prod smoke)
tradein-browseris up and camoufox fetches avito (health ok, no firewall), but it returned the ~400KB soft-block stub —preloadedStatepresent butpriceDetailed=0(zero listings). Root cause: camoufox ran with no proxy (datacenter IP), and avito serves the stub to datacenter IPs.server.pyreadSCRAPER_PROXY_URL, but the proxy inbackend/.env.runtimeis namedAVITO_PROXY_URL(mobileproxy, #623) — the same var curl_cffi-avito already uses. So the var was empty in the browser container → no proxy → stub.Fix
server.pynow readsAVITO_PROXY_URLfirst,SCRAPER_PROXY_URLas a generic fallback. One-line env-name swap; the value is the working mobileproxy egress already on the host. Also fixed 2 pre-existing ruff lints in this file (browser/ was never linted — pre-commit ruff is scoped to backend/).IP rotation stays backend-side:
AVITO_PROXY_ROTATE_URLis hit from avito's_rotate_ip(Phase 1) and changes the egress IP behind the same proxy endpoint, so the browser needs no reconfig.Verify after deploy
Expect real data:
priceDetailed>0 (~50),bytes~1.4MB,firewall 0. (Before this fix: priceDetailed=0, ~400KB stub.)Dormant —
scraper_fetch_modestillcurl_cffi; this only affects the browser service's proxy. Refs #905, #883, #623