Commit graph

2 commits

Author SHA1 Message Date
bot-backend
eac5a49a3a fix(tradein): repoint rosreestr_poll to /data-sets/ + verify Content-Type
All checks were successful
CI Trade-In / changes (pull_request) Successful in 7s
CI / changes (pull_request) Successful in 8s
CI Trade-In / frontend-checks (pull_request) Has been skipped
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
CI Trade-In / backend-tests (pull_request) Successful in 50s
The СДЕЛКИ open-data portal moved off /opendata/ (Bitrix redesign); the old
flat dataset URL now returns HTTP 200 with Content-Type text/html (soft-404)
instead of 404, so check_new_quarter_available() falsely reported every
quarter as available. /opendata/f.json also no longer serves JSON.

Rewrite the check to parse the new https://rosreestr.gov.ru/data-sets/ Apache
autoindex: decode each folder/file href as cp1251 percent-encoding (portal
does not use utf-8), locate the target quarter folder and dataset_СДЕЛКИ file,
then HEAD it and require Content-Type: application/zip AND Content-Length
> 100 KB before treating it as available — a bare 200 is no longer sufficient.
Also send a browser User-Agent and verify=False (RU TLS root CA, same pattern
as sber_index.py) since rosreestr.gov.ru 403s plain httpx requests.

Public signatures and the poll_rosreestr_new_quarter() return dict are
unchanged. rosreestr_dataset_url() now builds a best-effort cp1251-encoded
link into /data-sets/ (verified byte-for-byte against the live portal) for
the alert message; detection itself never depends on this guess.
2026-07-12 16:16:34 +03:00
c2888ac52d feat(tradein): scheduled monthly Rosreestr new-quarter poll → ingest alert (#888) (#894)
Some checks failed
Deploy Trade-In / build-backend (push) Successful in 2m21s
Deploy Trade-In / changes (push) Successful in 5s
Deploy Trade-In / build-frontend (push) Has been skipped
Deploy Trade-In / test (push) Successful in 33s
Deploy Trade-In / deploy (push) Has been cancelled
Co-authored-by: bot-backend <bot-backend@gendsgn.local>
Co-committed-by: bot-backend <bot-backend@gendsgn.local>
2026-05-31 13:13:55 +00:00