mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-20 09:21:25 +02:00
Compare commits
7 Commits
4e643276c0
...
b16f050552
Author | SHA1 | Date | |
---|---|---|---|
|
b16f050552 | ||
|
22012642f8 | ||
|
0fd6dc657f | ||
|
36e87f19e0 | ||
|
9b3e66e41d | ||
|
19de7f5f44 | ||
|
32bff8234b |
9
setup.py
9
setup.py
|
@ -62,7 +62,14 @@ def py2exe_params():
|
|||
'compressed': 1,
|
||||
'optimize': 2,
|
||||
'dist_dir': './dist',
|
||||
'excludes': ['Crypto', 'Cryptodome'], # py2exe cannot import Crypto
|
||||
'excludes': [
|
||||
# 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'],
|
||||
# Modules that are only imported dynamically must be added here
|
||||
'includes': ['yt_dlp.compat._legacy', 'yt_dlp.compat._deprecated',
|
||||
|
|
|
@ -4099,7 +4099,8 @@ class YoutubeDL:
|
|||
'client_certificate_key': 'client_certificate_key',
|
||||
'client_certificate_password': 'client_certificate_password',
|
||||
},
|
||||
})))
|
||||
}),
|
||||
))
|
||||
director.preferences.update(preferences or [])
|
||||
if 'prefer-legacy-http-handler' in self.params['compat_opts']:
|
||||
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 from collect_submodules('websockets')
|
||||
# These are auto-detected, but explicitly add them just in case
|
||||
yield from ('mutagen', 'brotli', 'certifi')
|
||||
yield from ('mutagen', 'brotli', 'certifi', 'requests', 'urllib3')
|
||||
|
||||
|
||||
hiddenimports = list(get_hidden_imports())
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import contextlib
|
||||
import functools
|
||||
import http.client
|
||||
import logging
|
||||
|
@ -116,10 +117,8 @@ See: https://github.com/urllib3/urllib3/issues/517
|
|||
"""
|
||||
|
||||
if urllib3_version < (2, 0, 0):
|
||||
try:
|
||||
with contextlib.suppress():
|
||||
urllib3.util.IS_SECURETRANSPORT = urllib3.util.ssl_.IS_SECURETRANSPORT = True
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
|
||||
# Requests will not automatically handle no_proxy by default
|
||||
|
|
Loading…
Reference in New Issue
Block a user