mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-20 09:21:25 +02:00
Compare commits
No commits in common. "b16f050552bbeccfb3e787a7d068f401ee09da12" and "4e643276c0145f8bf5322ea5b0d1bd8e84813bdb" have entirely different histories.
b16f050552
...
4e643276c0
9
setup.py
9
setup.py
|
@ -62,14 +62,7 @@ def py2exe_params():
|
||||||
'compressed': 1,
|
'compressed': 1,
|
||||||
'optimize': 2,
|
'optimize': 2,
|
||||||
'dist_dir': './dist',
|
'dist_dir': './dist',
|
||||||
'excludes': [
|
'excludes': ['Crypto', 'Cryptodome'], # py2exe cannot import Crypto
|
||||||
# py2exe cannot import Crypto
|
|
||||||
'Crypto',
|
|
||||||
'Cryptodome',
|
|
||||||
# py2exe appears to confuse this with our socks library.
|
|
||||||
# We don't use pysocks and urllib3.contrib.socks would fail to import if tried.
|
|
||||||
'urllib3.contrib.socks'
|
|
||||||
],
|
|
||||||
'dll_excludes': ['w9xpopen.exe', 'crypt32.dll'],
|
'dll_excludes': ['w9xpopen.exe', 'crypt32.dll'],
|
||||||
# Modules that are only imported dynamically must be added here
|
# Modules that are only imported dynamically must be added here
|
||||||
'includes': ['yt_dlp.compat._legacy', 'yt_dlp.compat._deprecated',
|
'includes': ['yt_dlp.compat._legacy', 'yt_dlp.compat._deprecated',
|
||||||
|
|
|
@ -4099,8 +4099,7 @@ class YoutubeDL:
|
||||||
'client_certificate_key': 'client_certificate_key',
|
'client_certificate_key': 'client_certificate_key',
|
||||||
'client_certificate_password': 'client_certificate_password',
|
'client_certificate_password': 'client_certificate_password',
|
||||||
},
|
},
|
||||||
}),
|
})))
|
||||||
))
|
|
||||||
director.preferences.update(preferences or [])
|
director.preferences.update(preferences or [])
|
||||||
if 'prefer-legacy-http-handler' in self.params['compat_opts']:
|
if 'prefer-legacy-http-handler' in self.params['compat_opts']:
|
||||||
director.preferences.add(lambda rh, _: 500 if rh.RH_KEY == 'Urllib' else 0)
|
director.preferences.add(lambda rh, _: 500 if rh.RH_KEY == 'Urllib' else 0)
|
||||||
|
|
|
@ -23,7 +23,7 @@ def get_hidden_imports():
|
||||||
yield pycryptodome_module()
|
yield pycryptodome_module()
|
||||||
yield from collect_submodules('websockets')
|
yield from collect_submodules('websockets')
|
||||||
# These are auto-detected, but explicitly add them just in case
|
# These are auto-detected, but explicitly add them just in case
|
||||||
yield from ('mutagen', 'brotli', 'certifi', 'requests', 'urllib3')
|
yield from ('mutagen', 'brotli', 'certifi')
|
||||||
|
|
||||||
|
|
||||||
hiddenimports = list(get_hidden_imports())
|
hiddenimports = list(get_hidden_imports())
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import contextlib
|
|
||||||
import functools
|
import functools
|
||||||
import http.client
|
import http.client
|
||||||
import logging
|
import logging
|
||||||
|
@ -117,8 +116,10 @@ See: https://github.com/urllib3/urllib3/issues/517
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if urllib3_version < (2, 0, 0):
|
if urllib3_version < (2, 0, 0):
|
||||||
with contextlib.suppress():
|
try:
|
||||||
urllib3.util.IS_SECURETRANSPORT = urllib3.util.ssl_.IS_SECURETRANSPORT = True
|
urllib3.util.IS_SECURETRANSPORT = urllib3.util.ssl_.IS_SECURETRANSPORT = True
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
# Requests will not automatically handle no_proxy by default
|
# Requests will not automatically handle no_proxy by default
|
||||||
|
|
Loading…
Reference in New Issue
Block a user