mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Use certifi to ensure CA certificates are bundled in pyinstaller
This commit is contained in:
parent
07a75a37c3
commit
263780e6a3
@ -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…
Reference in New Issue
Block a user