eaf-base-api 2.2.8__tar.gz → 2.2.9__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.8/eaf_base_api.egg-info → eaf_base_api-2.2.9}/PKG-INFO +6 -5
- {eaf_base_api-2.2.8 → eaf_base_api-2.2.9}/README.md +5 -4
- eaf_base_api-2.2.9/base_api/__init__.py +5 -0
- {eaf_base_api-2.2.8 → eaf_base_api-2.2.9}/base_api/base.py +9 -9
- {eaf_base_api-2.2.8 → eaf_base_api-2.2.9/eaf_base_api.egg-info}/PKG-INFO +6 -5
- {eaf_base_api-2.2.8 → eaf_base_api-2.2.9}/setup.py +1 -1
- eaf_base_api-2.2.8/base_api/__init__.py +0 -4
- {eaf_base_api-2.2.8 → eaf_base_api-2.2.9}/LICENSE +0 -0
- {eaf_base_api-2.2.8 → eaf_base_api-2.2.9}/base_api/modules/__init__.py +0 -0
- {eaf_base_api-2.2.8 → eaf_base_api-2.2.9}/base_api/modules/config.py +0 -0
- {eaf_base_api-2.2.8 → eaf_base_api-2.2.9}/base_api/modules/progress_bars.py +0 -0
- {eaf_base_api-2.2.8 → eaf_base_api-2.2.9}/eaf_base_api.egg-info/SOURCES.txt +0 -0
- {eaf_base_api-2.2.8 → eaf_base_api-2.2.9}/eaf_base_api.egg-info/dependency_links.txt +0 -0
- {eaf_base_api-2.2.8 → eaf_base_api-2.2.9}/eaf_base_api.egg-info/requires.txt +0 -0
- {eaf_base_api-2.2.8 → eaf_base_api-2.2.9}/eaf_base_api.egg-info/top_level.txt +0 -0
- {eaf_base_api-2.2.8 → eaf_base_api-2.2.9}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eaf_base_api
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.9
|
|
4
4
|
Summary: A base API for EchterAlsFake's Porn APIs
|
|
5
5
|
Home-page: https://github.com/EchterAlsFake/eaf_base_api
|
|
6
6
|
Author: Johannes Habel
|
|
@@ -35,10 +35,12 @@ support, and there was a lot of code that I would have rewritten in every API ag
|
|
|
35
35
|
package. The `BaseCore` class does all the necessary stuff like m3u8 parsing, a great caching system, network request
|
|
36
36
|
fetching with retry attempts and proxy support.
|
|
37
37
|
|
|
38
|
-
#
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
# Documentation (IMPORTANT!)
|
|
39
|
+
> [!IMPORTANT]
|
|
40
|
+
> Configuring eaf_base_api is necessary if you use any of my Porn APIs, because they all depend on this project.
|
|
41
|
+
> Please read through the documentation to learn how `PROXIES`, `CACHING` and `LOGGING` etc... work!
|
|
41
42
|
|
|
43
|
+
You can find the documentation here ->: https://github.com/EchterAlsFake/API_Docs/blob/master/Porn_APIs/eaf_base_api.md
|
|
42
44
|
|
|
43
45
|
# Can I use this for myself?
|
|
44
46
|
Yes, you can, but I may change stuff here and there from time to time, and it would maybe break your project.
|
|
@@ -47,7 +49,6 @@ I would not recommend you to install and use it as a package, but just copy the
|
|
|
47
49
|
I can recommend everyone the download functions for HLS streaming since, for example, the threaded preset is very well
|
|
48
50
|
optimized. If you just use mine, you need to consume less caffeine and brain cells to make such a function :)
|
|
49
51
|
|
|
50
|
-
|
|
51
52
|
# License
|
|
52
53
|
Licensed under The [LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.en.html) license.
|
|
53
54
|
<br>Copyright (C) 2024-2025 Johannes Habel
|
|
@@ -9,10 +9,12 @@ support, and there was a lot of code that I would have rewritten in every API ag
|
|
|
9
9
|
package. The `BaseCore` class does all the necessary stuff like m3u8 parsing, a great caching system, network request
|
|
10
10
|
fetching with retry attempts and proxy support.
|
|
11
11
|
|
|
12
|
-
#
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
# Documentation (IMPORTANT!)
|
|
13
|
+
> [!IMPORTANT]
|
|
14
|
+
> Configuring eaf_base_api is necessary if you use any of my Porn APIs, because they all depend on this project.
|
|
15
|
+
> Please read through the documentation to learn how `PROXIES`, `CACHING` and `LOGGING` etc... work!
|
|
15
16
|
|
|
17
|
+
You can find the documentation here ->: https://github.com/EchterAlsFake/API_Docs/blob/master/Porn_APIs/eaf_base_api.md
|
|
16
18
|
|
|
17
19
|
# Can I use this for myself?
|
|
18
20
|
Yes, you can, but I may change stuff here and there from time to time, and it would maybe break your project.
|
|
@@ -21,7 +23,6 @@ I would not recommend you to install and use it as a package, but just copy the
|
|
|
21
23
|
I can recommend everyone the download functions for HLS streaming since, for example, the threaded preset is very well
|
|
22
24
|
optimized. If you just use mine, you need to consume less caffeine and brain cells to make such a function :)
|
|
23
25
|
|
|
24
|
-
|
|
25
26
|
# License
|
|
26
27
|
Licensed under The [LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.en.html) license.
|
|
27
28
|
<br>Copyright (C) 2024-2025 Johannes Habel
|
|
@@ -17,11 +17,11 @@ from ffmpeg_progress_yield import FfmpegProgress
|
|
|
17
17
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
18
18
|
|
|
19
19
|
try:
|
|
20
|
-
from modules import config
|
|
20
|
+
from modules.config import config
|
|
21
21
|
from modules.progress_bars import Callback
|
|
22
22
|
|
|
23
23
|
except (ModuleNotFoundError, ImportError):
|
|
24
|
-
from .modules import config
|
|
24
|
+
from .modules.config import config
|
|
25
25
|
from .modules.progress_bars import Callback
|
|
26
26
|
|
|
27
27
|
loggers = {}
|
|
@@ -61,7 +61,7 @@ class ColoredFormatter(logging.Formatter):
|
|
|
61
61
|
def send_log_message(ip, port, message):
|
|
62
62
|
"""Sends a log message to a remote server via HTTP."""
|
|
63
63
|
try:
|
|
64
|
-
conn = http.client.HTTPConnection(ip, port, timeout=
|
|
64
|
+
conn = http.client.HTTPConnection(ip, port, timeout=5)
|
|
65
65
|
headers = {'Content-Type': 'application/json'}
|
|
66
66
|
data = json.dumps({"message": message})
|
|
67
67
|
conn.request("POST", "/log", body=data, headers=headers)
|
|
@@ -144,11 +144,11 @@ class Cache:
|
|
|
144
144
|
self.logger = setup_logger("BASE API - [Cache]", level=logging.CRITICAL)
|
|
145
145
|
self.config = config
|
|
146
146
|
|
|
147
|
-
def enable_logging(self, log_file=None, level=logging.DEBUG):
|
|
147
|
+
def enable_logging(self, log_file=None, level=logging.DEBUG, log_ip=None, log_port=None):
|
|
148
148
|
"""
|
|
149
149
|
Enables logging dynamically for this module.
|
|
150
150
|
"""
|
|
151
|
-
self.logger = setup_logger(name="BASE API - [Cache]", log_file=log_file, level=level)
|
|
151
|
+
self.logger = setup_logger(name="BASE API - [Cache]", log_file=log_file, level=level, http_ip=log_ip, http_port=log_port)
|
|
152
152
|
|
|
153
153
|
def handle_cache(self, url):
|
|
154
154
|
if url is None:
|
|
@@ -172,7 +172,7 @@ class BaseCore:
|
|
|
172
172
|
"""
|
|
173
173
|
The base class which has all necessary functions for other API packages
|
|
174
174
|
"""
|
|
175
|
-
def __init__(self, config=config
|
|
175
|
+
def __init__(self, config=config):
|
|
176
176
|
self.last_request_time = time.time()
|
|
177
177
|
self.total_requests = 0 # Tracks how many requests have been made
|
|
178
178
|
self.session = None
|
|
@@ -182,12 +182,12 @@ class BaseCore:
|
|
|
182
182
|
self.initialize_session()
|
|
183
183
|
self.logger = setup_logger("BASE API - [BaseCore]", log_file=False, level=logging.ERROR)
|
|
184
184
|
|
|
185
|
-
def enable_logging(self, log_file=None, level=logging.DEBUG):
|
|
185
|
+
def enable_logging(self, log_file=None, level=logging.DEBUG, log_ip=None, log_port=None):
|
|
186
186
|
"""
|
|
187
187
|
Enables logging dynamically for this module.
|
|
188
188
|
"""
|
|
189
|
-
self.logger = setup_logger(name="BASE API - [BaseCore]", log_file=log_file, level=level)
|
|
190
|
-
self.cache.logger = setup_logger(name="BASE API - [Cache]", log_file=log_file, level=level)
|
|
189
|
+
self.logger = setup_logger(name="BASE API - [BaseCore]", log_file=log_file, level=level, http_ip=log_ip, http_port=log_port)
|
|
190
|
+
self.cache.logger = setup_logger(name="BASE API - [Cache]", log_file=log_file, level=level, http_ip=log_ip, http_port=log_port)
|
|
191
191
|
|
|
192
192
|
def update_user_agent(self):
|
|
193
193
|
"""Updates the User-Agent"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: eaf_base_api
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.9
|
|
4
4
|
Summary: A base API for EchterAlsFake's Porn APIs
|
|
5
5
|
Home-page: https://github.com/EchterAlsFake/eaf_base_api
|
|
6
6
|
Author: Johannes Habel
|
|
@@ -35,10 +35,12 @@ support, and there was a lot of code that I would have rewritten in every API ag
|
|
|
35
35
|
package. The `BaseCore` class does all the necessary stuff like m3u8 parsing, a great caching system, network request
|
|
36
36
|
fetching with retry attempts and proxy support.
|
|
37
37
|
|
|
38
|
-
#
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
# Documentation (IMPORTANT!)
|
|
39
|
+
> [!IMPORTANT]
|
|
40
|
+
> Configuring eaf_base_api is necessary if you use any of my Porn APIs, because they all depend on this project.
|
|
41
|
+
> Please read through the documentation to learn how `PROXIES`, `CACHING` and `LOGGING` etc... work!
|
|
41
42
|
|
|
43
|
+
You can find the documentation here ->: https://github.com/EchterAlsFake/API_Docs/blob/master/Porn_APIs/eaf_base_api.md
|
|
42
44
|
|
|
43
45
|
# Can I use this for myself?
|
|
44
46
|
Yes, you can, but I may change stuff here and there from time to time, and it would maybe break your project.
|
|
@@ -47,7 +49,6 @@ I would not recommend you to install and use it as a package, but just copy the
|
|
|
47
49
|
I can recommend everyone the download functions for HLS streaming since, for example, the threaded preset is very well
|
|
48
50
|
optimized. If you just use mine, you need to consume less caffeine and brain cells to make such a function :)
|
|
49
51
|
|
|
50
|
-
|
|
51
52
|
# License
|
|
52
53
|
Licensed under The [LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.en.html) license.
|
|
53
54
|
<br>Copyright (C) 2024-2025 Johannes Habel
|
|
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
|