urllib.error.URLError: <urlopen error [WinError 10060] problem solving

Write custom directory titles here
urllib.error.URLError:

urllib.error.URLError: < Urlopen Error [WinError 10060] Connection attempt failed because the connector did not reply correctly after a period of time or the connected host did not respond. >
I used youTube-DL to download YouTube videos, but reported this error. You can access YouTube in your browser or you can download videos. No multithreading is used, and the import is urlopen in urllib.request. The solution is to set up the proxy for the command line. On the command line, type:
set http_proxy=http://127.0.0.1:1080
since I am using the HTTP protocol, I set the proxy for HTTP. If the HTTPS protocol is used, type:
set https_proxy=http://127.0.0.1:1080
it took all afternoon to finally fix it!

Read More: