reddrix 0.2.0__tar.gz → 0.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.
- {reddrix-0.2.0 → reddrix-0.2.2}/PKG-INFO +2 -2
- {reddrix-0.2.0 → reddrix-0.2.2}/README.md +1 -1
- {reddrix-0.2.0 → reddrix-0.2.2}/reddrix/__init__.py +1 -1
- {reddrix-0.2.0 → reddrix-0.2.2}/reddrix/reddrix.py +6 -5
- {reddrix-0.2.0 → reddrix-0.2.2}/reddrix.egg-info/PKG-INFO +2 -2
- {reddrix-0.2.0 → reddrix-0.2.2}/setup.py +1 -1
- {reddrix-0.2.0 → reddrix-0.2.2}/LICENSE.md +0 -0
- {reddrix-0.2.0 → reddrix-0.2.2}/reddrix/__main__.py +0 -0
- {reddrix-0.2.0 → reddrix-0.2.2}/reddrix/cli.py +0 -0
- {reddrix-0.2.0 → reddrix-0.2.2}/reddrix/exceptions.py +0 -0
- {reddrix-0.2.0 → reddrix-0.2.2}/reddrix/iwswuf.py +0 -0
- {reddrix-0.2.0 → reddrix-0.2.2}/reddrix.egg-info/SOURCES.txt +0 -0
- {reddrix-0.2.0 → reddrix-0.2.2}/reddrix.egg-info/dependency_links.txt +0 -0
- {reddrix-0.2.0 → reddrix-0.2.2}/reddrix.egg-info/entry_points.txt +0 -0
- {reddrix-0.2.0 → reddrix-0.2.2}/reddrix.egg-info/requires.txt +0 -0
- {reddrix-0.2.0 → reddrix-0.2.2}/reddrix.egg-info/top_level.txt +0 -0
- {reddrix-0.2.0 → reddrix-0.2.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: reddrix
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Reddrix is an open-source, blazing-fast Reddit Scraper for Python (No API Key)
|
|
5
5
|
Description-Content-Type: text/markdown
|
|
6
6
|
License-File: LICENSE.md
|
|
@@ -29,7 +29,7 @@ Dynamic: summary
|
|
|
29
29
|
|
|
30
30
|
<p align="center" id="badges">
|
|
31
31
|
<a href="https://pypi.org/project/reddrix/">
|
|
32
|
-
<img src="https://img.shields.io/badge/pypi-v0.2.
|
|
32
|
+
<img src="https://img.shields.io/badge/pypi-v0.2.2-orange.svg" alt="pypi package logo">
|
|
33
33
|
</a>
|
|
34
34
|
<a href="https://pypi.org/project/reddrix/">
|
|
35
35
|
<img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="python versions badge">
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<p align="center" class="badges">
|
|
10
10
|
<a href="https://pypi.org/project/reddrix/">
|
|
11
|
-
<img src="https://img.shields.io/badge/pypi-v0.2.
|
|
11
|
+
<img src="https://img.shields.io/badge/pypi-v0.2.2-orange.svg" alt="pypi package logo">
|
|
12
12
|
</a>
|
|
13
13
|
<a href="https://pypi.org/project/reddrix/">
|
|
14
14
|
<img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="python versions badge">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
from .reddrix import Reddrix
|
|
2
|
-
__version__ = "0.2.
|
|
2
|
+
__version__ = "0.2.2"
|
|
@@ -56,7 +56,7 @@ def auto_retry(max_attempts: int):
|
|
|
56
56
|
raise FatalAntiBotBlockError(f"Error executing function: {func.__name__}\n\nError Message: Cookies expired, and attempts have been exhausted.")
|
|
57
57
|
|
|
58
58
|
async with COOKIE_LOCK:
|
|
59
|
-
if current_time - scraper.cookies_last_accessed_at >= 15: # Must match the wait selector timeout.
|
|
59
|
+
if current_time - scraper.cookies_last_accessed_at >= 15 and scraper.is_running: # Must match the wait selector timeout.
|
|
60
60
|
await scraper.refresh_cookies()
|
|
61
61
|
|
|
62
62
|
await asyncio.sleep(min(2 ** attempt + random.uniform(0, 5), 60))
|
|
@@ -87,10 +87,7 @@ class Reddrix:
|
|
|
87
87
|
max_top_comments_per_post: int=999999,
|
|
88
88
|
proxies: list[str]=[],
|
|
89
89
|
verbose: bool=False
|
|
90
|
-
):
|
|
91
|
-
if http_client == "curl_cffi":
|
|
92
|
-
self.log("CURL_CFFI CLIENT IS DEPRECATED. SWITCHING TO CAMOUFOX...", level="warning")
|
|
93
|
-
|
|
90
|
+
):
|
|
94
91
|
self.mode = mode
|
|
95
92
|
self.max_results = max_results
|
|
96
93
|
self.max_posts_per_collection = max_posts_per_collection
|
|
@@ -120,6 +117,9 @@ class Reddrix:
|
|
|
120
117
|
self.page_semaphore = asyncio.Semaphore(10)
|
|
121
118
|
self.request_semaphore = asyncio.Semaphore(10)
|
|
122
119
|
self.items_queue = asyncio.Queue(maxsize=1000)
|
|
120
|
+
self.is_running = True
|
|
121
|
+
if http_client == "curl_cffi":
|
|
122
|
+
self.log("CURL_CFFI CLIENT IS DEPRECATED. SWITCHING TO CAMOUFOX...", level="warning")
|
|
123
123
|
|
|
124
124
|
async def start(self):
|
|
125
125
|
return await self.__aenter__()
|
|
@@ -822,4 +822,5 @@ class Reddrix:
|
|
|
822
822
|
else:
|
|
823
823
|
break
|
|
824
824
|
finally:
|
|
825
|
+
self.is_running = False
|
|
825
826
|
runner.cancel()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: reddrix
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Reddrix is an open-source, blazing-fast Reddit Scraper for Python (No API Key)
|
|
5
5
|
Description-Content-Type: text/markdown
|
|
6
6
|
License-File: LICENSE.md
|
|
@@ -29,7 +29,7 @@ Dynamic: summary
|
|
|
29
29
|
|
|
30
30
|
<p align="center" id="badges">
|
|
31
31
|
<a href="https://pypi.org/project/reddrix/">
|
|
32
|
-
<img src="https://img.shields.io/badge/pypi-v0.2.
|
|
32
|
+
<img src="https://img.shields.io/badge/pypi-v0.2.2-orange.svg" alt="pypi package logo">
|
|
33
33
|
</a>
|
|
34
34
|
<a href="https://pypi.org/project/reddrix/">
|
|
35
35
|
<img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="python versions badge">
|
|
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
|
|
File without changes
|