mirror of
				https://github.com/Garmelon/PFERD.git
				synced 2025-11-04 06:32:52 +01:00 
			
		
		
		
	Use certifi to ensure CA certificates are bundled in pyinstaller
This commit is contained in:
		@@ -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.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user