mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-12 15:35:05 +02:00
Use certifi to ensure CA certificates are bundled in pyinstaller
This commit is contained in:
parent
07a75a37c3
commit
263780e6a3
2 changed files with 4 additions and 0 deletions
|
|
@ -1,8 +1,10 @@
|
|||
import asyncio
|
||||
import ssl
|
||||
from pathlib import Path, PurePath
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
import aiohttp
|
||||
import certifi
|
||||
from aiohttp.client import ClientTimeout
|
||||
|
||||
from ..auth import Authenticator
|
||||
|
|
@ -155,6 +157,7 @@ class HttpCrawler(Crawler):
|
|||
async with aiohttp.ClientSession(
|
||||
headers={"User-Agent": f"{NAME}/{VERSION}"},
|
||||
cookie_jar=self._cookie_jar,
|
||||
connector=aiohttp.TCPConnector(ssl=ssl.create_default_context(cafile=certifi.where())),
|
||||
timeout=ClientTimeout(
|
||||
# 30 minutes. No download in the history of downloads was longer than 30 minutes.
|
||||
# This is enough to transfer a 600 MB file over a 3 Mib/s connection.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue