I downloaded a webpage in my python script. In most cases, this works fine.
However, this one had a response header: GZIP encoding, and when I tried to print the sou
I use zlib to decompress gzipped content from web.
import zlib import urllib f=urllib.request.urlopen(url) decompressed_data=zlib.decompress(f.read(), 16+zlib.MAX_WBITS)