[Tutor] using pythnn to open a password protected website
Alan Gauld
alan.gauld at btinternet.com
Fri Mar 19 19:58:37 CET 2010
"richard west" <richardbwest at gmail.com> wrote
> Im trying to use python to open up a password protected website(e.g.
> facebook / gmail) in Firefox.
So you are trying to control Firefox not the web site?
Is that correct?
What mechanism are you using to communicate with Firefox?
> code. So far I have only found urllib, urllib2 and web browser, none of
> which I have been able to use.
urllib is for interacting with the web site not with the browser.
webbrowser is for launching a browser for a user to interact with,
it does not really control the browser programatically.
You may need to use OS dependent tools like COM on
Windows or maybe even GUI events/messages to drive the
browser remotely. Are you sure that's really what you want to do?
Or do you really want to fill in and submit a web form on a
page protected by a login? If thats the case you can do it all
from Python without going near Firefox.
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list