I am trying to download some html using mechanize:

br=Browser()
r = br.open("url")
b = r.read()
print b

I have used this code successfully many times and now I have run across an instance where it fails. It opens the url without error but then prints nothing.

Looking at the http headers when it works fine it has a "Content-Length: XXXXX"

And when it does not work it has no Content-Length and it has
Transfer-Encoding: chunked

It could be that I am doing something else wrong (like maybe that site needs some different headers or something), but I had never seen this before so it made me suspicious.

Does urllib2 and mechanize deal with chunked encoding properly?  Is there something else that I need to do to make it work?

Thanks,
Sean


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to