fix(tradein-avito): strip Emotion CSS from listings.address #502

Merged
lekss361 merged 1 commit from feat/tradein-avito-clean-address-css into main 2026-05-24 10:52:51 +00:00

1 commit

Author SHA1 Message Date
lekss361
9e1c7d5147 fix(tradein-avito): strip Emotion CSS from listings.address
Avito DOM leaks inline <style>.css-XXX{...}</style> inside the location <p>,
which gets pulled by .text(strip=True). Add _clean_address() helper that strips
CSS rules + post-address noise (Площадь N года, от N мин.), apply at extraction
site. Also applied to address_full in avito_detail.py via import from avito.py.
Backfill migration cleans the ~hundreds of historical rows.

Source: estimate a0a0b820-e8a8-4eee-aa73-0ab3b98ac233 analog #4.
2026-05-24 13:28:41 +03:00