Downloading compressed content over HTTP using Python


Downloading compressed content over HTTP using Python



How do I take advantage of HTTP 1.1's compression when downloading web pages using Python?

I am currently using the built-in urllib module for downloading web content. Reading through the documentation I couldn't find any information that is indeed using compression.

Is it already built-in into urllib or is there another library that I can use?




How to create a simple c# http monitor/blocker?

1:



Can I coerce Apache into not including a WWW-Authenticate header for failed HTTP Basic Auth?
httplib2 supports 'deflate' and 'gzip' compression.


File Upload to HTTP server in iphone programming
.
Parse the HTTP_COOKIES string from Apache for use in #if clause
Example.
How do I get the response from an HTTP request on error?
import httplib2 h = httplib2.Http(".cache") resp, content = h.request("http://example.org/", "GET") 
The content is decompressed as necessary.


REST API error return good practices
.
Built-in methods to construct a POST request body in .NET?


Response does not start with HTTP


79 out of 100 based on 69 user ratings 919 reviews