i am using python urllib2.urlopen to get html content and i am getting a gziped response.
can i set the headers so i will get it not zipped ?
my code
response = urlopen(url,None , TIMEOUT)
html = response.read() # read html
print html
as Tichodroma suggested i try this
request = Request(url)
request.add_header('Accept-encoding', 'text/plain')
response = urlopen(request,None , TIMEOUT)
html = response.read().lower() # read html
print html
now it is working
Set the Accept
header to the mime types you want to accept.
Accept: text/plain
if you like this :)