python - retrieve application/json document with twill/mechanize in authenticated session -


I need to get a document with the MIME type "application / json". I am using Twill to log on to a site and when I try to code the URL go and show pointing to the JSON document I get this message:

  'HTTP header field' "Accept with value" text / html; * / * "Could not be parsed."  

I have tried to change the "Accept" field to "Application / JSON", but there is still no dice.

Thank you!

It does not make any sense which I am looking for, but who I want to do that.

The interface is a bit more complex twill, but not too much.

Still looking for a twill solution!


Comments