eaf-base-api 2.2.2__tar.gz → 2.2.4__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
1
  Metadata-Version: 2.2
2
2
  Name: eaf_base_api
3
- Version: 2.2.2
3
+ Version: 2.2.4
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
@@ -14,8 +14,6 @@ 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
-
19
17
  try:
20
18
  from modules import consts
21
19
  from modules.progress_bars import Callback
@@ -86,8 +84,8 @@ class BaseCore:
86
84
  self.session = httpx.Client(proxy=consts.PROXY,
87
85
  headers=consts.HEADERS,
88
86
  verify=verify,
89
- timeout=consts.TIMEOUT
90
- )
87
+ timeout=consts.TIMEOUT,
88
+ follow_redirects=True)
91
89
 
92
90
  def enforce_delay(self):
93
91
  """Enforces the specified delay in consts.REQUEST_DELAY"""
@@ -121,6 +119,9 @@ class BaseCore:
121
119
  return content
122
120
 
123
121
  for attempt in range(1, consts.MAX_RETRIES + 1):
122
+ if attempt != 1:
123
+ time.sleep(1.5) # Sleeping for 1.5 seconds to minimize site overload when doing a lot of requests
124
+
124
125
  try:
125
126
  # Update user agent periodically
126
127
  if self.total_requests % 3 == 0:
@@ -370,7 +371,6 @@ class BaseCore:
370
371
  try:
371
372
  with self.session.stream("GET", url, timeout=30) as response: # Use a reasonable timeout
372
373
  response.raise_for_status()
373
-
374
374
  file_size = int(response.headers.get('content-length', 0))
375
375
 
376
376
  if callback is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: eaf_base_api
3
- Version: 2.2.2
3
+ Version: 2.2.4
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
@@ -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.2",
5
+ version="2.2.4",
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