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
For Python 3
Try out this:
import gzip fetch = opener.open(request) # basically get a response object data = gzip.decompress(fetch.read()) data = str(data,'utf-8')