Python: URLError: urlopen error [Errno 10060]
The error code 10060 means it cannot connect to the remote peer. It might be because of the network problem or mostly your setting issues, such as proxy setting.
You could try to connect the same host with other tools(such as ncat) and/or with another PC within your same local network to find out where the problem is occuring.
For proxy issue, there are some material here:
Using an HTTP PROXY - Python
Why can't I get Python's urlopen() method to work on Windows?
Hope it helps!
python urlopen error [Errno 10060]
As discussed in the comments, executing large numbers of requests in very short time can lead to the server, especially web-servers, to block your connection attempts.
This is a common counter measure to automated attacks on the web.
Depending on the server, waiting very short amounts of time between requests should solve your problem.
You could also use a more dynamic approach. First, execute as much requests as possible with no waits in between. If a request takes significantly longer than usual it is most likely a timeout and you have to wait. At this point, you cancel your request, wait and try again. If the subsequent try also results in a timeout you double the waiting time. With this procedure, called adaptive backoff, you should be (hopefully) able to access the data you want with minimal overhead.
Related Topics
Check If a File Is Not Open Nor Being Used by Another Process
What's the Fastest Way in Python to Calculate Cosine Similarity Given Sparse Matrix Data
How to Switch to the Active Tab in Selenium
How to Replace Two Things at Once in a String
Reimport a Module While Interactive
Writing a Dict to Txt File and Reading It Back
How to Stop Flask Application Without Using Ctrl-C
Complexity of *In* Operator in Python
Does a File Object Automatically Close When Its Reference Count Hits Zero
Libxml Install Error Using Pip
Redirecting Stdout and Stderr to a Pyqt4 Qtextedit from a Secondary Thread
Increment a Python Floating Point Value by the Smallest Possible Amount