eaf-base-api 2.2.4__tar.gz → 2.2.5__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.4 → eaf_base_api-2.2.5}/PKG-INFO +1 -1
- {eaf_base_api-2.2.4 → eaf_base_api-2.2.5}/base_api/base.py +12 -3
- {eaf_base_api-2.2.4 → eaf_base_api-2.2.5}/eaf_base_api.egg-info/PKG-INFO +1 -1
- {eaf_base_api-2.2.4 → eaf_base_api-2.2.5}/setup.py +1 -1
- {eaf_base_api-2.2.4 → eaf_base_api-2.2.5}/LICENSE +0 -0
- {eaf_base_api-2.2.4 → eaf_base_api-2.2.5}/README.md +0 -0
- {eaf_base_api-2.2.4 → eaf_base_api-2.2.5}/base_api/__init__.py +0 -0
- {eaf_base_api-2.2.4 → eaf_base_api-2.2.5}/base_api/modules/__init__.py +0 -0
- {eaf_base_api-2.2.4 → eaf_base_api-2.2.5}/base_api/modules/consts.py +0 -0
- {eaf_base_api-2.2.4 → eaf_base_api-2.2.5}/base_api/modules/progress_bars.py +0 -0
- {eaf_base_api-2.2.4 → eaf_base_api-2.2.5}/eaf_base_api.egg-info/SOURCES.txt +0 -0
- {eaf_base_api-2.2.4 → eaf_base_api-2.2.5}/eaf_base_api.egg-info/dependency_links.txt +0 -0
- {eaf_base_api-2.2.4 → eaf_base_api-2.2.5}/eaf_base_api.egg-info/requires.txt +0 -0
- {eaf_base_api-2.2.4 → eaf_base_api-2.2.5}/eaf_base_api.egg-info/top_level.txt +0 -0
- {eaf_base_api-2.2.4 → eaf_base_api-2.2.5}/setup.cfg +0 -0
|
@@ -152,11 +152,20 @@ class BaseCore:
|
|
|
152
152
|
return response
|
|
153
153
|
|
|
154
154
|
# Process and return content
|
|
155
|
+
# Collecting all chunks before processing because some sites cause issues with real-time decoding
|
|
156
|
+
raw_content = b"".join(response.iter_bytes())
|
|
157
|
+
|
|
155
158
|
if get_bytes:
|
|
156
|
-
content =
|
|
159
|
+
content = raw_content
|
|
160
|
+
|
|
157
161
|
else:
|
|
158
|
-
|
|
159
|
-
|
|
162
|
+
try:
|
|
163
|
+
content = raw_content.decode("utf-8")
|
|
164
|
+
|
|
165
|
+
except UnicodeDecodeError:
|
|
166
|
+
content = raw_content.decode("latin1") # Fallback, hope that works somehow idk
|
|
167
|
+
|
|
168
|
+
if save_cache and not get_bytes:
|
|
160
169
|
logger.debug(f"Saving content of {url} to local cache.")
|
|
161
170
|
cache.save_cache(url, content)
|
|
162
171
|
|
|
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
|