Fill Javascript form

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


In article <3f9c74cf-72f4-45e2-8724-3939366d13bf at e24g2000vbe.googlegroups.com>,
Matteo  <tadwelessar at gmail.com> 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 pythoncraft.com)           <*>         http://www.pythoncraft.com/

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



More information about the Python-list mailing list