gendesign/tradein-mvp/backend/tests/scrapers
bot-backend a50af40ad6
All checks were successful
CI / changes (pull_request) Successful in 7s
CI / backend-tests (pull_request) Has been skipped
CI / frontend-tests (pull_request) Has been skipped
CI / openapi-codegen-check (pull_request) Has been skipped
fix(tradein/avito): reap dead 404 listings in detail backfill (don't trip block breaker)
avito_detail_backfill (mode=browser) aborted prod run 458 with
attempted=5 enriched=0 blocked=5: the lat-null pending queue is dominated
by DEAD listings (404 — that's why they are stale coord-holes). In browser
mode a dead listing's 404 page ("Ошибка 404. Страница не найдена") has no
item-view, so _is_detail_soft_block returned True → AvitoBlockedError →
backfill counted it as `blocked` and the consecutive-block breaker aborted
the run before reaching live listings.

- New AvitoListingGoneError (subclass of common AvitoError, NOT of
  AvitoBlockedError/AvitoRateLimitedError) so the backfill block-trap
  does not catch it.
- New _is_detail_not_found() detector + browser-mode branch in fetch_detail,
  checked BEFORE firewall/soft-block (keyed on the 404 title so it does not
  swallow the generic soft-block deflect). Curl path unchanged (404 → 302/
  non-200 → ValueError → failed, as before).
- Backfill: new `gone` counter; dedicated except AvitoListingGoneError branch
  that is neutral to the consecutive-block breaker and marks the listing
  is_active=FALSE (SAVEPOINT) so it leaves the snapshot scope.

Tests: unit for _is_detail_not_found (404 True; soft-block/item-view/empty
False), browser-mode fetch_detail raising AvitoListingGoneError (not Blocked),
and backfill gone-row marks inactive without aborting the breaker.
2026-06-28 14:05:31 +03:00
..
__init__.py fix(tradein/avito): anti-bot hardening — sleep + abort + shared session (#487) 2026-05-23 20:08:40 +00:00
test_avito_403_backconnect_reconnect.py fix(avito): gate 403 reconnect-retry on proxy presence only, not rotate_url absence 2026-06-18 21:31:20 +03:00
test_avito_429_bucket_skip.py fix(avito): tolerate 429 per-bucket instead of banning whole sweep 2026-06-18 23:03:28 +03:00
test_avito_anti_bot.py fix(scrapers): avito pipeline — новостройки house graceful (без housePage), AvitoBlockedError per-item не крашит прогон (#1820) 2026-06-20 09:53:46 +03:00
test_avito_detail_403_reconnect.py fix(avito): reconnect-retry on detail 403/firewall under backconnect proxy 2026-06-18 22:12:03 +03:00
test_avito_detail_429_reconnect.py fix(avito): reconnect-retry on detail 429 under backconnect proxy 2026-06-18 23:29:47 +03:00
test_avito_detail_browser_only.py fix(scrapers): avito_detail_backfill — снапшот ЕКБ+active, detail browser-only без curl-fallback на бан (#1814) 2026-06-19 21:58:35 +03:00
test_avito_detail_not_found.py fix(tradein/avito): reap dead 404 listings in detail backfill (don't trip block breaker) 2026-06-28 14:05:31 +03:00
test_avito_detail_soft_block.py fix(tradein/avito): detect HTTP-200 soft-block → rotate + coords-priority backfill ordering (#1950, #1967) 2026-06-28 08:06:12 +00:00
test_avito_exhaustive.py fix(tradein): avito _extract_total_count returns 0 on no-results page (stop empty-bracket split waste + fallback-listing scrape) 2026-06-18 20:01:41 +03:00
test_avito_imv_browser_transport.py feat(tradein-imv): route IMV backfill через BrowserFetcher.fetch_json за dormant-флагом (#915 Stage 3) (#1916) 2026-06-26 09:54:28 +00:00
test_avito_incremental_pagination.py feat(avito): incremental SERP pagination with date early-stop (param-gated, default off) 2026-06-18 22:01:46 +03:00
test_avito_sweep_retry.py fix(tradein): avito sweep page-level retry — transient page error no longer aborts run 2026-06-18 14:29:01 +03:00
test_browser_fetcher.py feat(tradein-browser): additive POST /fetch-json + BrowserFetcher.fetch_json (#915 Stage 2) (#1915) 2026-06-26 09:30:35 +00:00
test_cian_exhaustive.py feat(scrapers): cian SERP на BrowserFetcher (camoufox), снят code-side rotate (#1806) 2026-06-19 20:41:44 +03:00
test_domclick.py feat(tradein/domclick): enrich Layer A SERP parser — description, repair-inference, minhash, seller 2026-06-27 16:35:25 +03:00
test_domclick_detail.py feat(tradein/domclick): local-runner + ingest tooling → main (split from parked Layer-B) 2026-06-28 10:26:52 +03:00
test_price_brackets.py perf(tradein): shared EKB seed price-brackets across avito/cian/yandex (city-dict ready for multi-city) 2026-06-18 17:55:55 +03:00