feat(yandex): switch SERP scraping to JSON gate-API (bypasses bandwidth tarpit) #1665
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#1665
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/yandex-gate-api-json"
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?
Summary
Rewrites the yandex realty scraper to fetch the JSON gate-API (
/gate/react-page/get/) instead of scraping the HTML SERP — bypassing yandex's bandwidth-tarpit.Why (verified on prod 2026-06-17)
yandex anti-bot tarpits the heavy HTML SERP pages (throttles the flagged mobile-proxy IP to ~77 B/s → 30s timeout → 0 lots). But the gate-API path is NOT tarpitted:
robots.txt= 6491 B/s, and the offers API returned HTTP 200, 129KB JSON in 17.8s, 20 offers through the same proxy. Neither cookies (tested — connection-level tarpit ignores them) nor the camoufox browser layer (also times out on the heavy SERP) help; the JSON API is the real bypass.Bonus: richer data
The gate-API returns fields the HTML SERP lacked (which previously needed detail-enrichment / geocoding):
location.point→ lat/lon (was NULL in SERP),location.geocoderAddress→ full address with house numberarea.value,livingSpace,kitchenSpace,roomsTotal,floorsOffered/floorsTotal,building.builtYear/buildingType,ceilingHeight,price.value/valuePerPartpager.totalPages→ proper pagination (was capped at MAX_PAGES=3)Changes
yandex_realty.pyrewrite (1222→835 lines):_build_url→ gate-API URL (rgid=559132,type=SELL,category=APARTMENT,newFlat=NO,roomsTotal,priceMin/Max,page,_pageType=search,_providers=react-search-results-data; nocrcneeded); new_parse_gate_jsonoverresponse.search.offers.entities[]; pagination viapager.totalPages(capped). Keeps the system-curl SOCKS5 transport + rotate-on-tarpit retry (#1664) as safety.Test plan
Refs #759, #1658