eaf-base-api 2.4.5__tar.gz → 2.4.7__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.4.5/eaf_base_api.egg-info → eaf_base_api-2.4.7}/PKG-INFO +1 -1
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/base_api/base.py +5 -4
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/base_api/modules/config.py +4 -0
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7/eaf_base_api.egg-info}/PKG-INFO +1 -1
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/pyproject.toml +1 -1
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/LICENSE +0 -0
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/MANIFEST.in +0 -0
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/README.md +0 -0
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/base_api/__init__.py +0 -0
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/base_api/modules/__init__.py +0 -0
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/base_api/modules/errors.py +0 -0
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/base_api/modules/progress_bars.py +0 -0
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/eaf_base_api.egg-info/SOURCES.txt +0 -0
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/eaf_base_api.egg-info/dependency_links.txt +0 -0
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/eaf_base_api.egg-info/requires.txt +0 -0
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/eaf_base_api.egg-info/top_level.txt +0 -0
- {eaf_base_api-2.4.5 → eaf_base_api-2.4.7}/setup.cfg +0 -0
|
@@ -872,7 +872,6 @@ class BaseCore:
|
|
|
872
872
|
if status == 429:
|
|
873
873
|
if attempt == 0 or attempt == 1:
|
|
874
874
|
self.logger.info("Trying 429 bypass (Initializing new session...)")
|
|
875
|
-
del self.session
|
|
876
875
|
self.initialize_session()
|
|
877
876
|
continue
|
|
878
877
|
|
|
@@ -1120,7 +1119,7 @@ class BaseCore:
|
|
|
1120
1119
|
return url, b"", False
|
|
1121
1120
|
|
|
1122
1121
|
def download(self, video, quality: str, downloader: str, path: str, callback=None, remux: bool = False,
|
|
1123
|
-
callback_remux=None) -> None:
|
|
1122
|
+
callback_remux=None, max_workers_download: int = 20) -> None:
|
|
1124
1123
|
"""
|
|
1125
1124
|
:param video:
|
|
1126
1125
|
:param callback:
|
|
@@ -1129,8 +1128,10 @@ class BaseCore:
|
|
|
1129
1128
|
:param path:
|
|
1130
1129
|
:param remux:
|
|
1131
1130
|
:param callback_remux:
|
|
1131
|
+
:param max_workers_download:
|
|
1132
1132
|
:return:
|
|
1133
1133
|
"""
|
|
1134
|
+
max_workers_download = max_workers_download or self.config.max_workers_download
|
|
1134
1135
|
|
|
1135
1136
|
if callback is None:
|
|
1136
1137
|
callback = Callback.text_progress_bar
|
|
@@ -1139,14 +1140,14 @@ class BaseCore:
|
|
|
1139
1140
|
self.default(video=video, quality=quality, path=path, callback=callback, remux=remux, callback_remux=callback_remux)
|
|
1140
1141
|
|
|
1141
1142
|
elif downloader == "threaded":
|
|
1142
|
-
threaded_download = self.threaded(max_workers=
|
|
1143
|
+
threaded_download = self.threaded(max_workers=max_workers_download, timeout=self.config.timeout)
|
|
1143
1144
|
threaded_download(self, video=video, quality=quality, path=path, callback=callback, remux=remux,
|
|
1144
1145
|
callback_remux=callback_remux)
|
|
1145
1146
|
|
|
1146
1147
|
elif downloader == "FFMPEG":
|
|
1147
1148
|
self.FFMPEG(video=video, quality=quality, path=path, callback=callback)
|
|
1148
1149
|
|
|
1149
|
-
def threaded(self, max_workers: int
|
|
1150
|
+
def threaded(self, max_workers: int, timeout: int):
|
|
1150
1151
|
def wrapper(self, video, quality: str, callback, path: str, remux: bool = True, callback_remux=None):
|
|
1151
1152
|
"""
|
|
1152
1153
|
This function has already been optimized a lot and is pretty much perfect in what's possible if we
|
|
@@ -12,6 +12,10 @@ class RuntimeConfig:
|
|
|
12
12
|
self.cookies = None
|
|
13
13
|
self.locale = "en-US,en;q=0.9" # If you override this, it could change regexes and thus make stuff not work...
|
|
14
14
|
self.use_http2 = True
|
|
15
|
+
self.max_workers_download = 20
|
|
16
|
+
self.videos_concurrency = 5
|
|
17
|
+
self.pages_concurrency = 2
|
|
18
|
+
|
|
15
19
|
|
|
16
20
|
# Singleton instance needed for my Porn Fetch project
|
|
17
21
|
config = RuntimeConfig()
|
|
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
|
|
File without changes
|