diff --git a/src/scraper/exhaustive.py b/src/scraper/exhaustive.py index eb95ba8..046d641 100644 --- a/src/scraper/exhaustive.py +++ b/src/scraper/exhaustive.py @@ -27,7 +27,12 @@ HEADERS = { "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", "Accept-Language": "en-US,en;q=0.9,es;q=0.8", - "Accept-Encoding": "gzip, deflate, br", + # Sin "br": el descompresor incremental de aiohttp 3.14 falla con streams + # brotli válidos según el troceo de chunks (disclosure.org, todaywhy.com; + # los mismos bytes descomprimen bien offline con brotlicffi). Con gzip el + # camino zlib es sólido. brotlicffi queda instalado por si algún servidor + # manda br sin que se anuncie. + "Accept-Encoding": "gzip, deflate", "DNT": "1", } @@ -36,7 +41,7 @@ REDDIT_HEADERS = { "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36", "Accept": "application/json, text/javascript, */*; q=0.01", "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate, br", + "Accept-Encoding": "gzip, deflate", # sin "br", ver HEADERS "Referer": "https://www.reddit.com/", "X-Requested-With": "XMLHttpRequest", }