eaf-base-api 2.2__tar.gz → 2.2.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.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: eaf_base_api
3
- Version: 2.2
3
+ Version: 2.2.2
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
@@ -13,6 +13,15 @@ License-File: LICENSE
13
13
  Requires-Dist: ffmpeg-progress-yield
14
14
  Requires-Dist: m3u8
15
15
  Requires-Dist: httpx
16
+ Dynamic: author
17
+ Dynamic: author-email
18
+ Dynamic: classifier
19
+ Dynamic: description
20
+ Dynamic: description-content-type
21
+ Dynamic: home-page
22
+ Dynamic: license
23
+ Dynamic: requires-dist
24
+ Dynamic: summary
16
25
 
17
26
  # EAF Base API
18
27
 
@@ -14,6 +14,8 @@ 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
+
17
19
  try:
18
20
  from modules import consts
19
21
  from modules.progress_bars import Callback
@@ -264,9 +266,7 @@ class BaseCore:
264
266
  Returns a tuple of the URL, content (empty if failed after retries), and a success flag.
265
267
  """
266
268
 
267
- response = BaseCore().fetch(url, timeout=timeout, get_response=True)
268
- response.raise_for_status()
269
- content = b"".join(response.iter_bytes())
269
+ content = BaseCore().fetch(url, timeout=timeout, get_bytes=True)
270
270
  return url, content, True # Success
271
271
 
272
272
  def threaded(self, max_workers: int = 20, timeout: int = 10):
@@ -419,4 +419,15 @@ class BaseCore:
419
419
 
420
420
  @classmethod
421
421
  def truncate(cls, string_lol) -> str:
422
- return string_lol[:200]
422
+ return string_lol[:200]
423
+
424
+ @staticmethod
425
+ def str_to_bool(value):
426
+ """
427
+ This function is needed for the ArgumentParser for the CLI version of my APIs. It basically maps the
428
+ booleans for the --no-title option to valid Python boolean values.
429
+ """
430
+ if value.lower() in ("true", "1", "yes"):
431
+ return True
432
+ elif value.lower() in ("false", "0", "no"):
433
+ return False
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: eaf_base_api
3
- Version: 2.2
3
+ Version: 2.2.2
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
@@ -13,6 +13,15 @@ License-File: LICENSE
13
13
  Requires-Dist: ffmpeg-progress-yield
14
14
  Requires-Dist: m3u8
15
15
  Requires-Dist: httpx
16
+ Dynamic: author
17
+ Dynamic: author-email
18
+ Dynamic: classifier
19
+ Dynamic: description
20
+ Dynamic: description-content-type
21
+ Dynamic: home-page
22
+ Dynamic: license
23
+ Dynamic: requires-dist
24
+ Dynamic: summary
16
25
 
17
26
  # EAF Base API
18
27
 
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="eaf_base_api",
5
- version="2.2",
5
+ version="2.2.2",
6
6
  packages=find_packages(),
7
7
  install_requires=["ffmpeg-progress-yield", "m3u8", "httpx"],
8
8
  entry_points={
File without changes
File without changes
File without changes