Jun-06-2024, 01:30 PM
(This post was last modified: Jun-06-2024, 01:30 PM by deanhystad.)
Your program getsites.py has an error on line 11 that causes urlopen to fail. The error is 11001, getaddrinfo failed.
How did you make D:\Desktop\sites.txt?
From the urlib requests documentation.
Error:Traceback (most recent call last):
File "D:\Desktop\getsites.py", line 11, in <module>
with urlopen(myurl) as webpage:
. . .
File "C:\Users\luger\AppData\Local\Programs\Python\Python313\Lib\urllib\request.py", line 1321, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 11001] getaddrinfo failed>
Your url is invalid. An invalid URL does not mean the address doesn't exist (that is a 404 error), but the format of the URL is incorrect. Does your url start with "http://"? Are there invalid characters (control characters) in the url?How did you make D:\Desktop\sites.txt?
From the urlib requests documentation.
Quote:urllib.request.urlopen(url, data=None, [timeout, ]*, cafile=None, capath=None, cadefault=False, context=None)ΒΆ
Open url, which can be either a string containing a valid, properly encoded URL, or a Request object.