python: urllib2 using gzip and uncompress

This checks if the content is gzipped and decompresses it:

 

from:http://stackoverflow.com/questions/3947120/does-python-urllib2-will-automaticly-uncompress-gzip-data-from-fetch-webpage

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注