File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
async_rutube_downloader/utils Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1+ import ssl
12from asyncio import AbstractEventLoop
23
3- from aiohttp import ClientSession , ClientTimeout
4+ import certifi
5+ from aiohttp import ClientSession , ClientTimeout , TCPConnector
46
57from async_rutube_downloader .utils .miscellaneous import get_or_create_loop
68
@@ -24,8 +26,15 @@ def create_aiohttp_session(
2426 # Chunks are small in size,
2527 # so 3 minutes should be enough to download one chunk.
2628 )
29+
30+ # Fixes [SSL: CERTIFICATE_VERIFY_FAILED] in PyInstaller builds,
31+ # especially on GitHub Actions, where system CA certs may be missing.
32+ # certifi provides a portable CA bundle for reliable HTTPS.
33+ ssl_context = ssl .create_default_context (cafile = certifi .where ())
34+ connector = TCPConnector (ssl = ssl_context , loop = loop )
2735 return ClientSession (
2836 loop = loop ,
2937 timeout = session_timeout ,
38+ connector = connector ,
3039 raise_for_status = True ,
3140 )
Original file line number Diff line number Diff line change 11[project ]
22name = " async_rutube_downloader"
3- version = " 1.4.1 "
3+ version = " 1.4.2 "
44description = " download video from RuTube"
55authors = [{ name = " Miron Sadykov" , email = " MironSadykov@yandex.ru" }]
66readme = " docs/README.md"
You can’t perform that action at this time.
0 commit comments