how to deal with socket.error: (10060, 'Operation timed out')
phpbird at gmail.com
Sat Mar 18 07:30:48 EST 2006
I wrote a script to get 100 pages from a server.
2:conns = httplib.HTTPConnection("www.mytest.com")
sometimes a socket error was raised.
File "D:\usr\bin\lib\httplib.py", line 627, in connect
raise socket.error, msg
socket.error: (10060, 'Operation timed out')
how to catch this kind of error then retry the "GET" operation?
If I want to get many page on same server, which lib is the best
choice? I only know httplib,urllib and urllib2.
thanks a lot.
More information about the Python-list