URLError: <urlopen error [Errno 11001] getaddrinfo failed>

Shaozhong SHI shishaozhong at gmail.com
Sat Feb 12 15:15:43 EST 2022


The following is used in a loop to get response code for each url.

print (urllib.request.urlopen(url).getcode())

However, error message says: URLError: <urlopen error [Errno 11001]
getaddrinfo failed>

Python 3.6.5 is being used to test whether url is live or not.

Can anyone shed light on this?

Regards,

David


More information about the Python-list mailing list