I’m doing fetch links using python. and suddenly I lost the connection and display an error as below.
IOError: [Errno socket error] [Errno 110] Connection timed out
how to reconnect with the same link?
for instance
import urllib
a = 'http://anzaholyman.files.wordpress.com/2011/12/zip-it.gif'
image = urllib.URLopener()
image.retrieve(a,'1.jpg')
You can simply use the
try..exceptsyntax: