Pythonを使用してWebページをダウンロードするときにHTTP1.1の圧縮を利用するにはどうすればよいですか?
現在、Webコンテンツのダウンロードに組み込みのurllibモジュールを使用しています。ドキュメントを読んでも、実際に圧縮を使用している情報は見つかりませんでした。
すでにurllibに組み込まれていますか、それとも使用できる別のライブラリがありますか?
httplib2 supports 'deflate' and 'gzip' compression.
Example
import httplib2
h = httplib2.Http(".cache")
resp, content = h.request("http://example.org/", "GET")
The content is decompressed as necessary.