I am trying to write somecode of this kind :)....
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor() )
opener.addheaders = [
('Accept-Encoding','gzip,deflate'),....
urllib2.install_opener(opener)You told the website that you would accept gzip encoded data, and it
fu = urllib2.urlopen('http://www.google.com')
print fu.read()
I am not able to open any webpage as the content is junk
characters.something like below..what could be the
problem?????????????
looks like the website decided to send you some. You need to either
take that header out of your opener, or actually handle the gzipped
data that's being sent back to you.
--
Jerry