eaf-base-api 2.2.3__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.3
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
@@ -84,8 +84,8 @@ class BaseCore:
84
84
  self.session = httpx.Client(proxy=consts.PROXY,
85
85
  headers=consts.HEADERS,
86
86
  verify=verify,
87
- timeout=consts.TIMEOUT
88
- )
87
+ timeout=consts.TIMEOUT,
88
+ follow_redirects=True)
89
89
 
90
90
  def enforce_delay(self):
91
91
  """Enforces the specified delay in consts.REQUEST_DELAY"""
@@ -119,6 +119,9 @@ class BaseCore:
119
119
  return content
120
120
 
121
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
+
122
125
  try:
123
126
  # Update user agent periodically
124
127
  if self.total_requests % 3 == 0:
@@ -368,7 +371,6 @@ class BaseCore:
368
371
  try:
369
372
  with self.session.stream("GET", url, timeout=30) as response: # Use a reasonable timeout
370
373
  response.raise_for_status()
371
-
372
374
  file_size = int(response.headers.get('content-length', 0))
373
375
 
374
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.3
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.3",
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