Reputation: 13914
Copying the setup of a mechanize browser from a tutorial I set br.set_handle_gzip(True)
. When I scrape a site with the browser object python prints UserWarning: gzip transfer encoding is experimental!
This answer from a year ago explains that setting it to False
will make the error message go away. Ok, obviously, but what does this setting actually control? What type of content would require this feature? Is it ok to turn it off if the page is just basic html?
Upvotes: 1
Views: 900
Reputation: 527043
Many web servers support compressing content before sending it to the client, to speed up transfers. They do this using gzip compression.
That setting determines whether the client will tell the server it's willing to accept gzip'd content. If it doesn't, the server will transmit the content uncompressed.
Upvotes: 2