One - One Code All

Blog Content

python网页获取request报错Received response with content-encoding: gzip, but failed to decode it

Python   2011-09-06 17:46:04

python网页获取request报错Received response with content-encoding: gzip, but failed to decode it


requests.exceptions.ContentDecodingError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing: incorrect data check',))


解决办法:

requests.get(url=url, headers={'Accept-Encoding': ''})





上一篇:python将pandas或numpy省略的数据全部显示display
下一篇:BeautifulSoup路径选择css选择器

The minute you think of giving up, think of the reason why you held on so long.