[Tutor] using mechanize to authenticate and pull data out of site

David Abbott david at pythontoo.com
Sat Dec 26 23:01:08 CET 2009


On Sat, 2009-12-26 at 16:46 +0100, Norman Khine wrote:
> Hello,
> 
> I am trying to authenticate on http://commerce.sage.com/Solidarmonde/
> using urllib but have a problem in that there are some hidden fields
> that use javascript to create a security token which then is passed to
> the submit button and to the header.
I used pycurl to login and post to a drupal site;
http://code.google.com/p/gentoo-community-portal/source/browse/trunk/gentooligans.py
I had to go to the page and store the token then use that to login or
enter data. I am new to programming so I am sure I make some mistakes
but it may help. Go down to line 374 I store the token and then use that
later to enter data. 



More information about the Tutor mailing list