I have code for reading an url like this:
from urllib2 import Request, urlopen req = Request(url) for key, val in headers.items(): req.add_header(key, va
Had the same issue with socket timeout on the read statement. What worked for me was putting both the urlopen and the read inside a try statement. Hope this helps!