gendesign/backend/app
Light1YT 4571938b56 fix(scrapers): throttle + optional proxy levers for KN flats loader (#1945)
DOM.РФ WAF банит на full sweep (~17k req @ concurrency=8): сессия,
тронувшая gated /сервисы/api/object/* extras, получает 403 → cookies
сессии флагуются → последующие запросы (incl. flats) тоже 403.

Эмпирически (prod worker, throttle@concurrency=2, без прокси):
  • flats-only, 100 объектов / 104 req — 0 WAF-бан;
  • mixed flats+extras — extras 403 сразу, затем травит сессию (flats→403).
Значит throttle снижает rate, но НЕ устраняет session-poisoning от extras;
прокси (mobile-proxy, как в tradein) — следующий рычаг, off-by-default.

- config: scrape_kn_browser_concurrency=2, scrape_kn_request_jitter_{min,max}_ms,
  scrape_kn_proxy_url=None (прокси опционален, дефолт — прямое подключение).
- stealth.BrowserSession: per-instance concurrency / jitter / proxy_url;
  parse_proxy_url(http://user:pass@host:port → Playwright proxy-dict).
  Модульный _BROWSER_CONCURRENCY=8 не тронут — catalog/nspd без изменений.
- domrf_kn.run_region_sweep + workers/tasks/scrape_kn: прокидывают новые
  settings ТОЛЬКО в KN-sweep BrowserSession.
- tests: parse_proxy_url, threading concurrency/jitter/proxy, defaults unchanged.
2026-06-28 17:10:22 +05:00
..
api perf(objective): request-path consumers dedup inline, not via whole-table view (#1964) 2026-06-28 05:00:47 +05:00
core fix(scrapers): throttle + optional proxy levers for KN flats loader (#1945) 2026-06-28 17:10:22 +05:00
models merge: resolve conflicts with main (#1660) into week-review-finish 2026-06-17 20:21:06 +03:00
observability feat(backend): sentry-sdk init для FastAPI + Celery (#204 backend) (#207) 2026-05-16 15:09:16 +00:00
schemas feat(concept): фронт-пикер типовых домов (#1965 Stage 3b) 2026-06-28 02:49:44 +05:00
scrapers fix(week-review): backend-аудит v2 — 82 фиксов (#1660) 2026-06-17 17:13:38 +00:00
services fix(scrapers): throttle + optional proxy levers for KN flats loader (#1945) 2026-06-28 17:10:22 +05:00
templates fix(site-finder): 5 дефектов из боевого фидбека analyze (#1736 #1737 #1738 #1739 #1740) 2026-06-18 11:47:21 +05:00
workers fix(scrapers): throttle + optional proxy levers for KN flats loader (#1945) 2026-06-28 17:10:22 +05:00
__init__.py init 2026-04-25 13:45:19 +03:00
main.py fix(backend): emit app.* INFO logs to stdout on the API process (#1926) 2026-06-27 07:43:49 +05:00