if response.headers.get('Content-Encoding'):
print gzip.GzipFile(fileobj=StringIO.StringIO(response.read())).read()
else:
print response.read()
if response.headers.get('Content-Encoding'):
print gzip.GzipFile(fileobj=StringIO.StringIO(response.read())).read()
else:
print response.read()