Use certificates from certifi if installed (#3115)

Fixes #3102 and most `CERTIFICATE_VERIFY_FAILED` issues

Authored by: coletdjnz
This commit is contained in:
coletdev
2022-03-23 12:26:55 +13:00
committed by GitHub
parent 8a23db9519
commit d5820461e8
6 changed files with 37 additions and 23 deletions

View File

@@ -72,6 +72,7 @@ from .utils import (
formatSeconds,
GeoRestrictedError,
get_domain,
has_certifi,
HEADRequest,
InAdvancePagedList,
int_or_none,
@@ -3676,6 +3677,7 @@ class YoutubeDL(object):
lib_str = join_nonempty(
compat_brotli and compat_brotli.__name__,
has_certifi and 'certifi',
compat_pycrypto_AES and compat_pycrypto_AES.__name__.split('.')[0],
SECRETSTORAGE_AVAILABLE and 'secretstorage',
has_mutagen and 'mutagen',