eaf-base-api 2.2.2__tar.gz → 2.2.4__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.2.2 → eaf_base_api-2.2.4}/PKG-INFO +1 -1
- {eaf_base_api-2.2.2 → eaf_base_api-2.2.4}/base_api/base.py +5 -5
- {eaf_base_api-2.2.2 → eaf_base_api-2.2.4}/eaf_base_api.egg-info/PKG-INFO +1 -1
- {eaf_base_api-2.2.2 → eaf_base_api-2.2.4}/setup.py +1 -1
- {eaf_base_api-2.2.2 → eaf_base_api-2.2.4}/LICENSE +0 -0
- {eaf_base_api-2.2.2 → eaf_base_api-2.2.4}/README.md +0 -0
- {eaf_base_api-2.2.2 → eaf_base_api-2.2.4}/base_api/__init__.py +0 -0
- {eaf_base_api-2.2.2 → eaf_base_api-2.2.4}/base_api/modules/__init__.py +0 -0
- {eaf_base_api-2.2.2 → eaf_base_api-2.2.4}/base_api/modules/consts.py +0 -0
- {eaf_base_api-2.2.2 → eaf_base_api-2.2.4}/base_api/modules/progress_bars.py +0 -0
- {eaf_base_api-2.2.2 → eaf_base_api-2.2.4}/eaf_base_api.egg-info/SOURCES.txt +0 -0
- {eaf_base_api-2.2.2 → eaf_base_api-2.2.4}/eaf_base_api.egg-info/dependency_links.txt +0 -0
- {eaf_base_api-2.2.2 → eaf_base_api-2.2.4}/eaf_base_api.egg-info/requires.txt +0 -0
- {eaf_base_api-2.2.2 → eaf_base_api-2.2.4}/eaf_base_api.egg-info/top_level.txt +0 -0
- {eaf_base_api-2.2.2 → eaf_base_api-2.2.4}/setup.cfg +0 -0
|
@@ -14,8 +14,6 @@ from urllib.parse import urljoin
|
|
|
14
14
|
from ffmpeg_progress_yield import FfmpegProgress
|
|
15
15
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
16
16
|
|
|
17
|
-
from twine.utils import get_config
|
|
18
|
-
|
|
19
17
|
try:
|
|
20
18
|
from modules import consts
|
|
21
19
|
from modules.progress_bars import Callback
|
|
@@ -86,8 +84,8 @@ class BaseCore:
|
|
|
86
84
|
self.session = httpx.Client(proxy=consts.PROXY,
|
|
87
85
|
headers=consts.HEADERS,
|
|
88
86
|
verify=verify,
|
|
89
|
-
timeout=consts.TIMEOUT
|
|
90
|
-
)
|
|
87
|
+
timeout=consts.TIMEOUT,
|
|
88
|
+
follow_redirects=True)
|
|
91
89
|
|
|
92
90
|
def enforce_delay(self):
|
|
93
91
|
"""Enforces the specified delay in consts.REQUEST_DELAY"""
|
|
@@ -121,6 +119,9 @@ class BaseCore:
|
|
|
121
119
|
return content
|
|
122
120
|
|
|
123
121
|
for attempt in range(1, consts.MAX_RETRIES + 1):
|
|
122
|
+
if attempt != 1:
|
|
123
|
+
time.sleep(1.5) # Sleeping for 1.5 seconds to minimize site overload when doing a lot of requests
|
|
124
|
+
|
|
124
125
|
try:
|
|
125
126
|
# Update user agent periodically
|
|
126
127
|
if self.total_requests % 3 == 0:
|
|
@@ -370,7 +371,6 @@ class BaseCore:
|
|
|
370
371
|
try:
|
|
371
372
|
with self.session.stream("GET", url, timeout=30) as response: # Use a reasonable timeout
|
|
372
373
|
response.raise_for_status()
|
|
373
|
-
|
|
374
374
|
file_size = int(response.headers.get('content-length', 0))
|
|
375
375
|
|
|
376
376
|
if callback is None:
|
|
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
|