En Wed, 21 Jan 2009 23:21:06 -0200, K-Dawg <[email protected]> escribió:
I am trying to use mechanize to connect and log into Yahoo!
Here is my code:
#c:\Python25\python
import re
import urllib
import urllib2
import mechanize
print "print1"
br = mechanize.Browser()
br.set_handle_robots(False)
br.open("https://login.yahoo.com/config/login?")
It is hanging at the open. Eventually I have to just kill it and I get
this:
Sockets are blocking by default - and never time out. See if mechanize has
some way to set a timeout - otherwise you may try the code below, before
anything else:
socket.setdefaulttimeout(60)
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list