aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/compat/urllib/request.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/compat/urllib/request.py')
-rw-r--r--yt_dlp/compat/urllib/request.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/yt_dlp/compat/urllib/request.py b/yt_dlp/compat/urllib/request.py
index ad9fa83c8..dfc7f4a2d 100644
--- a/yt_dlp/compat/urllib/request.py
+++ b/yt_dlp/compat/urllib/request.py
@@ -7,9 +7,9 @@ passthrough_module(__name__, 'urllib.request')
del passthrough_module
-from .. import compat_os_name
+import os
-if compat_os_name == 'nt':
+if os.name == 'nt':
# On older Python versions, proxies are extracted from Windows registry erroneously. [1]
# If the https proxy in the registry does not have a scheme, urllib will incorrectly add https:// to it. [2]
# It is unlikely that the user has actually set it to be https, so we should be fine to safely downgrade
@@ -37,4 +37,4 @@ if compat_os_name == 'nt':
def getproxies():
return getproxies_environment() or getproxies_registry_patched()
-del compat_os_name
+del os