warp-beacon 2.3.51__tar.gz → 2.3.52__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.
- {warp_beacon-2.3.51/warp_beacon.egg-info → warp_beacon-2.3.52}/PKG-INFO +1 -1
- warp_beacon-2.3.52/warp_beacon/__version__.py +2 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scraper/__init__.py +5 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scraper/account_selector.py +12 -1
- {warp_beacon-2.3.51 → warp_beacon-2.3.52/warp_beacon.egg-info}/PKG-INFO +1 -1
- warp_beacon-2.3.51/warp_beacon/__version__.py +0 -2
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/LICENSE +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/MANIFEST.in +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/README.md +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/assets/placeholder.gif +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/etc/.gitignore +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/etc/accounts.json +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/etc/proxies.json +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/etc/warp_beacon.conf +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/etc/warp_beacon.service +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/pyproject.toml +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/setup.cfg +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/setup.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/__init__.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/compress/__init__.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/compress/video.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/jobs/__init__.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/jobs/abstract.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/jobs/download_job.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/jobs/types.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/jobs/upload_job.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/mediainfo/__init__.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/mediainfo/abstract.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/mediainfo/audio.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/mediainfo/silencer.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/mediainfo/video.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scheduler/__init__.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scheduler/instagram_human.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scheduler/scheduler.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scraper/abstract.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scraper/exceptions.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scraper/fail_handler.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scraper/instagram/__init__.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scraper/instagram/instagram.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scraper/link_resolver.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scraper/youtube/__init__.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scraper/youtube/abstract.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scraper/youtube/music.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scraper/youtube/shorts.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/scraper/youtube/youtube.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/storage/__init__.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/storage/mongo.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/telegram/__init__.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/telegram/bot.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/telegram/caption_shortener.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/telegram/handlers.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/telegram/placeholder_message.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/telegram/utils.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/uploader/__init__.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon/warp_beacon.py +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon.egg-info/SOURCES.txt +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon.egg-info/dependency_links.txt +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon.egg-info/entry_points.txt +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon.egg-info/requires.txt +0 -0
- {warp_beacon-2.3.51 → warp_beacon-2.3.52}/warp_beacon.egg-info/top_level.txt +0 -0
@@ -121,6 +121,11 @@ class AsyncDownloader(object):
|
|
121
121
|
if job.job_origin is Origin.INSTAGRAM:
|
122
122
|
from warp_beacon.scraper.instagram.instagram import InstagramScraper
|
123
123
|
actor = InstagramScraper(selector.get_current(), proxy)
|
124
|
+
selector.inc_ig_request_count()
|
125
|
+
if selector.get_ig_request_count() >= int(os.environ.get("IG_REQUESTS_PER_ACCOUNT", default="20")):
|
126
|
+
logging.info("The account request limit has been reached. Selecting the next account.")
|
127
|
+
selector.reset_ig_request_count()
|
128
|
+
selector.next()
|
124
129
|
elif job.job_origin is Origin.YT_SHORTS:
|
125
130
|
from warp_beacon.scraper.youtube.shorts import YoutubeShortsScraper
|
126
131
|
actor = YoutubeShortsScraper(selector.get_current(), proxy)
|
@@ -23,6 +23,7 @@ class AccountSelector(object):
|
|
23
23
|
manager = None
|
24
24
|
account_index = {}
|
25
25
|
current_proxy = None
|
26
|
+
ig_request_count = None
|
26
27
|
|
27
28
|
def __init__(self, manager: multiprocessing.managers.SyncManager, acc_file_path: str, proxy_file_path: str=None) -> None:
|
28
29
|
self.manager = manager
|
@@ -31,6 +32,7 @@ class AccountSelector(object):
|
|
31
32
|
with open(acc_file_path, 'r', encoding="utf-8") as f:
|
32
33
|
self.accounts = json.loads(f.read())
|
33
34
|
if self.accounts:
|
35
|
+
self.ig_request_count = self.manager.Value('i', 0)
|
34
36
|
self.__init_meta_data()
|
35
37
|
#self.load_yt_sessions()
|
36
38
|
for acc_type, _ in self.accounts.items():
|
@@ -170,4 +172,13 @@ class AccountSelector(object):
|
|
170
172
|
module_name = 'youtube' if next((s for s in ("yt", "youtube", "youtu_be") if s in mod_name.value), None) else 'instagram'
|
171
173
|
if module_name not in self.accounts:
|
172
174
|
return 0
|
173
|
-
return len(self.accounts[module_name])
|
175
|
+
return len(self.accounts[module_name])
|
176
|
+
|
177
|
+
def inc_ig_request_count(self) -> None:
|
178
|
+
self.ig_request_count.value += 1
|
179
|
+
|
180
|
+
def reset_ig_request_count(self) -> None:
|
181
|
+
self.ig_request_count.value = 0
|
182
|
+
|
183
|
+
def get_ig_request_count(self) -> int:
|
184
|
+
return self.ig_request_count.value
|
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
|
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
|
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
|
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
|
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
|