How can I use HTTP 1.1 compression when loading web pages using Python?
I am currently using the urllib built-in module to download web content. Reading the documentation, I could not find any information that really uses compression.
Is it already built into urllib or is there any other library that I can use?
httplib2 supports both deflate and gzip compression.
Example
import httplib2 h = httplib2.Http(".cache") resp, content = h.request("http://example.org/", "GET")
Content is unpacked as needed.
Source: https://habr.com/ru/post/1715777/More articles:Auto exposure Asp.Net MVC - asp.netHow to store data offline and then update it in a SQLite database in batch mode? - c #How to tell a person that he needs to improve his skills? - project-managementHow can I write a WebDAV server with Delphi? - javaVS.NET class developer - visual-studioHow to change Url.Encode character replacement strategy in ASP.NET MVC? - urlHttpHandler does not rewrite - c #Fiddler/Firebug Π΄Π»Ρ Adobe AIR? - flexHow to remove bullets from an unordered list using CSS? - htmlIf I never mention System.IO in my program, why does my user get an error message? - .netAll Articles