Fill Javascript form

Aahz aahz at
Tue May 12 22:15:28 CEST 2009

In article <3f9c74cf-72f4-45e2-8724-3939366d13bf at>,
Matteo  <tadwelessar at> wrote:
>I have to fill a web form to authenticate and connect to the internet.
>I thought it would have been easy to make a script to do that
>automatically on startup.
>Unfortunately, it turned out that the form is written in JavaScript,
>and urllib2 therefore fails to even fetch the form.

Depending on whether you can reverse-engineer the form, you can either
just POST data to the webserver or you need to access a JavaScript
library.  Selenium might be an answer to the latter problem; you could
also look into using WebKit.
Aahz (aahz at           <*>

"It is easier to optimize correct code than to correct optimized code."
--Bill Harlan

More information about the Python-list mailing list