reddrix 0.2.2__tar.gz → 0.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.
- {reddrix-0.2.2 → reddrix-0.2.4}/PKG-INFO +2 -2
- {reddrix-0.2.2 → reddrix-0.2.4}/README.md +1 -1
- {reddrix-0.2.2 → reddrix-0.2.4}/reddrix/__init__.py +1 -1
- {reddrix-0.2.2 → reddrix-0.2.4}/reddrix/reddrix.py +6 -6
- {reddrix-0.2.2 → reddrix-0.2.4}/reddrix.egg-info/PKG-INFO +2 -2
- {reddrix-0.2.2 → reddrix-0.2.4}/setup.py +1 -1
- {reddrix-0.2.2 → reddrix-0.2.4}/LICENSE.md +0 -0
- {reddrix-0.2.2 → reddrix-0.2.4}/reddrix/__main__.py +0 -0
- {reddrix-0.2.2 → reddrix-0.2.4}/reddrix/cli.py +0 -0
- {reddrix-0.2.2 → reddrix-0.2.4}/reddrix/exceptions.py +0 -0
- {reddrix-0.2.2 → reddrix-0.2.4}/reddrix/iwswuf.py +0 -0
- {reddrix-0.2.2 → reddrix-0.2.4}/reddrix.egg-info/SOURCES.txt +0 -0
- {reddrix-0.2.2 → reddrix-0.2.4}/reddrix.egg-info/dependency_links.txt +0 -0
- {reddrix-0.2.2 → reddrix-0.2.4}/reddrix.egg-info/entry_points.txt +0 -0
- {reddrix-0.2.2 → reddrix-0.2.4}/reddrix.egg-info/requires.txt +0 -0
- {reddrix-0.2.2 → reddrix-0.2.4}/reddrix.egg-info/top_level.txt +0 -0
- {reddrix-0.2.2 → reddrix-0.2.4}/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.4
|
|
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.4-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.4-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.4"
|
|
@@ -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 >=
|
|
59
|
+
if current_time - scraper.cookies_last_accessed_at >= 40 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))
|
|
@@ -174,7 +174,7 @@ class Reddrix:
|
|
|
174
174
|
ls = iwsuff("pskmr")
|
|
175
175
|
|
|
176
176
|
await self.page.goto("https://old.reddit.com/login")
|
|
177
|
-
await self.page.wait_for_selector(f".{ls}")
|
|
177
|
+
await self.page.wait_for_selector(f".{ls}", timeout=20000)
|
|
178
178
|
h = await self.page.wait_for_selector(f'[{nn}="{n1}"]')
|
|
179
179
|
s = await self.page.wait_for_selector(f'[{nn}="{n2}"]')
|
|
180
180
|
await h.click()
|
|
@@ -191,7 +191,7 @@ class Reddrix:
|
|
|
191
191
|
|
|
192
192
|
bgns = await self.page.wait_for_selector(f".{ls}")
|
|
193
193
|
await bgns.click()
|
|
194
|
-
await self.page.wait_for_selector('[alt="User Avatar"]')
|
|
194
|
+
await self.page.wait_for_selector('[alt="User Avatar"]', timeout=20000)
|
|
195
195
|
else: # Deprecated
|
|
196
196
|
self.session = AsyncSession(proxy=self.new_proxy_url(), allow_redirects=True)
|
|
197
197
|
self.session.headers["User-Agent"] = f"Reddrix{random.randint(0, 999999)}/v0.1.7"
|
|
@@ -276,12 +276,12 @@ class Reddrix:
|
|
|
276
276
|
self.context = await self.browser.new_context()
|
|
277
277
|
self.page = await self.context.new_page()
|
|
278
278
|
n1 = iwsuff("ywivreqi")
|
|
279
|
-
n2 = iwsuff("
|
|
279
|
+
n2 = iwsuff("tewwasvh")
|
|
280
280
|
nn = iwsuff("reqi")
|
|
281
281
|
ls = iwsuff("pskmr")
|
|
282
282
|
|
|
283
283
|
await self.page.goto("https://old.reddit.com/login")
|
|
284
|
-
await self.page.wait_for_selector(f".{ls}")
|
|
284
|
+
await self.page.wait_for_selector(f".{ls}", timeout=20000)
|
|
285
285
|
h = await self.page.wait_for_selector(f'[{nn}="{n1}"]')
|
|
286
286
|
s = await self.page.wait_for_selector(f'[{nn}="{n2}"]')
|
|
287
287
|
await h.click()
|
|
@@ -298,7 +298,7 @@ class Reddrix:
|
|
|
298
298
|
|
|
299
299
|
bgns = await self.page.wait_for_selector(f".{ls}")
|
|
300
300
|
await bgns.click()
|
|
301
|
-
await self.page.wait_for_selector('[alt="User Avatar"]')
|
|
301
|
+
await self.page.wait_for_selector('[alt="User Avatar"]', timeout=20000)
|
|
302
302
|
else: # Deprecated
|
|
303
303
|
self.session = AsyncSession(proxy=self.new_proxy_url(), allow_redirects=True)
|
|
304
304
|
self.session.headers["User-Agent"] = f"Reddrix{random.randint(0, 999999)}/v0.1.7"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: reddrix
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
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.4-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
|