GerapyPlaywright icon indicating copy to clipboard operation
GerapyPlaywright copied to clipboard

gzip.BadGzipFile: Not a gzipped file (b'<!')

Open legend-zl opened this issue 3 years ago • 2 comments

使用Sscrapy的时候,利用

yield PlaywrightRequest(article_url, callback=self.parse_result, wait_until='domcontentloaded', headers=self.headers)

出现错误:gzip.BadGzipFile: Not a gzipped file (b'<!')

legend-zl avatar May 08 '22 15:05 legend-zl

metoo

gdszps avatar May 30 '22 06:05 gdszps

修改 downloadermiddlewares.py中的378行 headers=response.headers, 改为 headers=headers,

作者在380-382行已经修复了这个问题,但是居然没有引用处理后的headers

wAnFen1017 avatar Jul 12 '23 01:07 wAnFen1017