Using Mechanize to Fill Out a Form
KDawg44 at gmail.com
Tue Dec 16 22:26:56 CET 2008
On Dec 16, 3:44 pm, KDawg44 <KDaw... at gmail.com> wrote:
> I am trying to use the Mechanize module to browse to a site, fill out
> a form, and login. However, it hangs on the opening of the URL. The
> URL is https, will this cause the open from mechanize to fail?
Apparently, the HTTPS does not matter, but it is still hanging on the
open(URL). I am trying to login to Yahoo!.
baseURL = 'https://login.yahoo.com/'
br = mechanize.Browser()
br.addheaders = [('User-Agent', 'Firefox')]
It just hangs until I kill it. When I kill it, it gives me the
Traceback (most recent call last):
File "FantasyHockeyLoginAndGetTeam.py", line 14, in <module>
File "build/bdist.linux-i686/egg/mechanize/_mechanize.py", line 209,
File "build/bdist.linux-i686/egg/mechanize/_mechanize.py", line 236,
File "build/bdist.linux-i686/egg/mechanize/_opener.py", line 202, in
File "build/bdist.linux-i686/egg/mechanize/_http.py", line 578, in
Thanks for any advice.
More information about the Python-list