eaf-base-api 2.3.7__tar.gz → 2.3.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {eaf_base_api-2.3.7/eaf_base_api.egg-info → eaf_base_api-2.3.8}/PKG-INFO +1 -1
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8}/base_api/base.py +7 -3
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8}/base_api/modules/errors.py +7 -0
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8/eaf_base_api.egg-info}/PKG-INFO +1 -1
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8}/setup.py +1 -1
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8}/LICENSE +0 -0
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8}/README.md +0 -0
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8}/base_api/__init__.py +0 -0
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8}/base_api/modules/__init__.py +0 -0
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8}/base_api/modules/config.py +0 -0
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8}/base_api/modules/progress_bars.py +0 -0
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8}/eaf_base_api.egg-info/SOURCES.txt +0 -0
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8}/eaf_base_api.egg-info/dependency_links.txt +0 -0
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8}/eaf_base_api.egg-info/requires.txt +0 -0
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8}/eaf_base_api.egg-info/top_level.txt +0 -0
- {eaf_base_api-2.3.7 → eaf_base_api-2.3.8}/setup.cfg +0 -0
|
@@ -233,13 +233,13 @@ class BaseCore:
|
|
|
233
233
|
raise KillSwitch("CRITICAL PROXY ERROR, CHECK LOGS!")
|
|
234
234
|
|
|
235
235
|
|
|
236
|
-
def initialize_session(self
|
|
236
|
+
def initialize_session(self): # Disable SSL verification only if you really need it....
|
|
237
237
|
self.session = httpx.Client(
|
|
238
238
|
proxy=self.config.proxy,
|
|
239
239
|
headers=self.config.headers,
|
|
240
240
|
timeout=self.config.timeout,
|
|
241
241
|
follow_redirects=True,
|
|
242
|
-
verify=
|
|
242
|
+
verify=self.config.verify_ssl
|
|
243
243
|
)
|
|
244
244
|
|
|
245
245
|
def update_headers(self, headers: dict):
|
|
@@ -369,8 +369,12 @@ class BaseCore:
|
|
|
369
369
|
self.logger.error(f"Attempt {attempt}: The connection has been unexpectedly closed by: {url}. Retrying...")
|
|
370
370
|
continue
|
|
371
371
|
|
|
372
|
-
except httpx.RequestError as e:
|
|
372
|
+
except (httpx.RequestError, httpx.ConnectError) as e:
|
|
373
373
|
self.logger.error(f"Attempt {attempt}: Request error for URL {url}: {e}")
|
|
374
|
+
|
|
375
|
+
if "CERTIFICATE_VERIFY_FAILED" in str(e):
|
|
376
|
+
raise ProxySSLError("Proxy has an invalid SSL certificate, to get around this error, set 'verify = False' in config")
|
|
377
|
+
|
|
374
378
|
self.logger.info(f"Retrying ({attempt}/{self.config.max_retries}) for URL: {url}")
|
|
375
379
|
continue # Continuing even failed requests, because they may succeed on another try (maybe idk)
|
|
376
380
|
|
|
@@ -42,3 +42,10 @@ class NetworkingError(Exception):
|
|
|
42
42
|
def __init__(self, message):
|
|
43
43
|
self.message = message
|
|
44
44
|
|
|
45
|
+
|
|
46
|
+
class ProxySSLError(Exception):
|
|
47
|
+
"""
|
|
48
|
+
Raises if a proxy request fails due to self-signed certificates or invalid TLS verification
|
|
49
|
+
"""
|
|
50
|
+
def __init__(self, message):
|
|
51
|
+
self.message = message
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|