Skip to content

A feature-rich command-line audio/video downloader

[utils] certifi: Make sure the pem file exists

pukkandanb07897ef5bcd
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py
index 35e8d1d5b6..966548466e 100644
--- a/yt_dlp/utils.py
+++ b/yt_dlp/utils.py
@@ -70,7 +70,8 @@ from .socks import ProxyType, sockssocket
try:
import certifi
- has_certifi = True
+ # The certificate may not be bundled in executable
+ has_certifi = os.path.exists(certifi.where())
except ImportError:
has_certifi = False