eaf_base_api 3.3__tar.gz → 3.3.2__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-3.3 → eaf_base_api-3.3.2}/PKG-INFO +3 -3
- {eaf_base_api-3.3 → eaf_base_api-3.3.2}/base_api/base.py +15 -6
- {eaf_base_api-3.3 → eaf_base_api-3.3.2}/pyproject.toml +3 -3
- {eaf_base_api-3.3 → eaf_base_api-3.3.2}/LICENSE +0 -0
- {eaf_base_api-3.3 → eaf_base_api-3.3.2}/README.md +0 -0
- {eaf_base_api-3.3 → eaf_base_api-3.3.2}/base_api/__init__.py +0 -0
- {eaf_base_api-3.3 → eaf_base_api-3.3.2}/base_api/modules/__init__.py +0 -0
- {eaf_base_api-3.3 → eaf_base_api-3.3.2}/base_api/modules/config.py +0 -0
- {eaf_base_api-3.3 → eaf_base_api-3.3.2}/base_api/modules/errors.py +0 -0
- {eaf_base_api-3.3 → eaf_base_api-3.3.2}/base_api/modules/logger.py +0 -0
- {eaf_base_api-3.3 → eaf_base_api-3.3.2}/base_api/modules/progress_bars.py +0 -0
- {eaf_base_api-3.3 → eaf_base_api-3.3.2}/base_api/modules/static_functions.py +0 -0
- {eaf_base_api-3.3 → eaf_base_api-3.3.2}/base_api/modules/type_hints.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eaf_base_api
|
|
3
|
-
Version: 3.3
|
|
3
|
+
Version: 3.3.2
|
|
4
4
|
Summary: A base API for EchterAlsFake's Porn APIs
|
|
5
5
|
Author: Johannes Habel
|
|
6
6
|
Author-email: Johannes Habel <EchterAlsFake@proton.me>
|
|
@@ -10,8 +10,8 @@ Classifier: Programming Language :: Python
|
|
|
10
10
|
Requires-Dist: curl-cffi
|
|
11
11
|
Requires-Dist: tenacity>=9.1.2
|
|
12
12
|
Requires-Dist: m3u8 ; extra == 'hls'
|
|
13
|
-
Requires-Dist: av ; python_full_version >= '3.
|
|
14
|
-
Requires-Python: >=3.
|
|
13
|
+
Requires-Dist: av ; python_full_version >= '3.12' and extra == 'hls'
|
|
14
|
+
Requires-Python: >=3.12
|
|
15
15
|
Project-URL: Homepage, https://github.com/EchterAlsFake/eaf_base_api
|
|
16
16
|
Project-URL: Repository, https://github.com/EchterAlsFake/eaf_base_api
|
|
17
17
|
Provides-Extra: hls
|
|
@@ -978,6 +978,9 @@ class BaseCore:
|
|
|
978
978
|
if attempt.retry_state.attempt_number <= 2:
|
|
979
979
|
raise NetworkingError("429 Rate Limited")
|
|
980
980
|
|
|
981
|
+
if status == 401:
|
|
982
|
+
return response # Expected (for Vinted OSINT script I use)
|
|
983
|
+
|
|
981
984
|
if 500 <= status < 600:
|
|
982
985
|
self.logger.warning("Server error %s on %s. Retrying...", status, url)
|
|
983
986
|
raise NetworkingError(f"Server error {status}")
|
|
@@ -1043,8 +1046,8 @@ a new Python file, import only m3u8 and see what error you get.
|
|
|
1043
1046
|
assert m3u8 is not None
|
|
1044
1047
|
|
|
1045
1048
|
if inspect.iscoroutinefunction(m3u8_url) or (callable(m3u8_url) and not isinstance(m3u8_url, str)):
|
|
1046
|
-
m3u8_url =
|
|
1047
|
-
|
|
1049
|
+
m3u8_url = m3u8_url()
|
|
1050
|
+
if inspect.iscoroutine(m3u8_url) or inspect.isawaitable(m3u8_url):
|
|
1048
1051
|
m3u8_url = await m3u8_url
|
|
1049
1052
|
|
|
1050
1053
|
if m3u8_url.lstrip().startswith("#EXTM3U"):
|
|
@@ -1079,6 +1082,12 @@ a new Python file, import only m3u8 and see what error you get.
|
|
|
1079
1082
|
Inspect the master playlist and return sorted unique heights (e.g., [240, 360, 480, 720, 1080]).
|
|
1080
1083
|
"""
|
|
1081
1084
|
assert m3u8 is not None
|
|
1085
|
+
|
|
1086
|
+
if inspect.iscoroutinefunction(m3u8_url) or (callable(m3u8_url) and not isinstance(m3u8_url, str)):
|
|
1087
|
+
m3u8_url = m3u8_url()
|
|
1088
|
+
if inspect.iscoroutine(m3u8_url) or inspect.isawaitable(m3u8_url):
|
|
1089
|
+
m3u8_url = await m3u8_url
|
|
1090
|
+
|
|
1082
1091
|
if not m3u8_url.startswith("https://"):
|
|
1083
1092
|
master = m3u8.loads(m3u8_url)
|
|
1084
1093
|
else:
|
|
@@ -1249,8 +1258,8 @@ a new Python file, import only m3u8 and see what error you get.
|
|
|
1249
1258
|
m3u8_url = getattr(video, "m3u8_base_url", None)
|
|
1250
1259
|
|
|
1251
1260
|
if inspect.iscoroutinefunction(m3u8_url) or (callable(m3u8_url) and not isinstance(m3u8_url, str)):
|
|
1252
|
-
m3u8_url =
|
|
1253
|
-
|
|
1261
|
+
m3u8_url = m3u8_url()
|
|
1262
|
+
if inspect.iscoroutine(m3u8_url) or inspect.isawaitable(m3u8_url):
|
|
1254
1263
|
m3u8_url = await m3u8_url
|
|
1255
1264
|
|
|
1256
1265
|
self.logger.info(
|
|
@@ -1389,8 +1398,8 @@ a new Python file, import only m3u8 and see what error you get.
|
|
|
1389
1398
|
m3u8_master = getattr(video, "m3u8_base_url")
|
|
1390
1399
|
assert m3u8_master is not None, "m3u8_base_url is missing from video object"
|
|
1391
1400
|
if inspect.iscoroutinefunction(m3u8_master) or (callable(m3u8_master) and not isinstance(m3u8_master, str)):
|
|
1392
|
-
m3u8_master =
|
|
1393
|
-
|
|
1401
|
+
m3u8_master = m3u8_master()
|
|
1402
|
+
if inspect.iscoroutine(m3u8_master) or inspect.isawaitable(m3u8_master):
|
|
1394
1403
|
m3u8_master = await m3u8_master
|
|
1395
1404
|
self.logger.info(f"Fetching segments for quality={quality} m3u8_url_master={m3u8_master}")
|
|
1396
1405
|
segments = await self.get_segments(quality=quality, m3u8_url_master=m3u8_master)
|
|
@@ -4,10 +4,10 @@ build-backend = "uv_build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "eaf_base_api"
|
|
7
|
-
version = "3.3"
|
|
7
|
+
version = "3.3.2"
|
|
8
8
|
description = "A base API for EchterAlsFake's Porn APIs"
|
|
9
9
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
11
|
license = "LGPL-3.0-or-later"
|
|
12
12
|
license-files = ["LICENSE*"]
|
|
13
13
|
|
|
@@ -28,7 +28,7 @@ dependencies = [
|
|
|
28
28
|
hls = [
|
|
29
29
|
"m3u8",
|
|
30
30
|
# av needs Python >= 3.10, so guard it (otherwise `pip install ...[hls]` fails on 3.8/3.9)
|
|
31
|
-
"av; python_version >= '3.
|
|
31
|
+
"av; python_version >= '3.12'",
|
|
32
32
|
]
|
|
33
33
|
|
|
34
34
|
[project.urls]
|
|
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
|