warp-beacon 2.4.7__tar.gz → 2.4.9__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.4.7/warp_beacon.egg-info → warp_beacon-2.4.9}/PKG-INFO +1 -1
- warp_beacon-2.4.9/warp_beacon/__version__.py +2 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scheduler/instagram_human.py +14 -3
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scraper/__init__.py +4 -2
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scraper/abstract.py +4 -2
- {warp_beacon-2.4.7 → warp_beacon-2.4.9/warp_beacon.egg-info}/PKG-INFO +1 -1
- warp_beacon-2.4.7/warp_beacon/__version__.py +0 -2
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/LICENSE +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/MANIFEST.in +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/README.md +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/assets/placeholder.gif +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/etc/.gitignore +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/etc/accounts.json +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/etc/proxies.json +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/etc/warp_beacon.conf +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/etc/warp_beacon.service +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/pyproject.toml +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/setup.cfg +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/setup.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/__init__.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/compress/__init__.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/compress/video.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/jobs/__init__.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/jobs/abstract.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/jobs/download_job.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/jobs/types.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/jobs/upload_job.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/mediainfo/__init__.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/mediainfo/abstract.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/mediainfo/audio.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/mediainfo/silencer.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/mediainfo/video.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scheduler/__init__.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scheduler/scheduler.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scraper/account_selector.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scraper/exceptions.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scraper/fail_handler.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scraper/instagram/__init__.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scraper/instagram/instagram.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scraper/link_resolver.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scraper/youtube/__init__.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scraper/youtube/abstract.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scraper/youtube/music.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scraper/youtube/shorts.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/scraper/youtube/youtube.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/storage/__init__.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/storage/mongo.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/telegram/__init__.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/telegram/bot.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/telegram/caption_shortener.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/telegram/handlers.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/telegram/placeholder_message.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/telegram/utils.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/uploader/__init__.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/warp_beacon.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon/yt_auth.py +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon.egg-info/SOURCES.txt +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon.egg-info/dependency_links.txt +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon.egg-info/entry_points.txt +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon.egg-info/requires.txt +0 -0
- {warp_beacon-2.4.7 → warp_beacon-2.4.9}/warp_beacon.egg-info/top_level.txt +0 -0
@@ -33,6 +33,7 @@ class InstagramHuman(object):
|
|
33
33
|
self.scrapler.timeline_cursor = self.scrapler.download_hndlr(self.scrapler.cl.get_timeline_feed, "pull_to_refresh", self.scrapler.timeline_cursor.get("next_max_id"))
|
34
34
|
time.sleep(random.uniform(3, 7))
|
35
35
|
if random.random() > 0.5:
|
36
|
+
logging.info("Checking direct ...")
|
36
37
|
self.scrapler.download_hndlr(self.scrapler.cl.direct_active_presence)
|
37
38
|
time.sleep(random.uniform(2, 5))
|
38
39
|
if random.random() > 0.3:
|
@@ -71,6 +72,7 @@ class InstagramHuman(object):
|
|
71
72
|
self.scrapler.download_hndlr(self.scrapler.cl.direct_active_presence)
|
72
73
|
time.sleep(random.uniform(2, 5))
|
73
74
|
if random.random() > 0.5:
|
75
|
+
logging.info("Checking notifications, tags ...")
|
74
76
|
self.scrapler.download_hndlr(self.scrapler.cl.notification_like_and_comment_on_photo_user_tagged, "everyone")
|
75
77
|
self.random_pause()
|
76
78
|
if random.random() > 0.4:
|
@@ -123,12 +125,21 @@ class InstagramHuman(object):
|
|
123
125
|
logging.info("user_info with target_user_id = '%s' ...", target_user_id)
|
124
126
|
#self.scrapler.download_hndlr(self.scrapler.cl.user_info, target_user_id)
|
125
127
|
self.scrapler.download_hndlr(self.scrapler.cl.user_info_v1, target_user_id)
|
128
|
+
time.sleep(random.uniform(2, 5))
|
129
|
+
|
130
|
+
if random.random() > 0.5:
|
131
|
+
logging.info("Checking direct ...")
|
132
|
+
self.scrapler.download_hndlr(self.scrapler.cl.direct_active_presence)
|
133
|
+
self.random_pause()
|
126
134
|
|
127
|
-
|
128
|
-
|
135
|
+
if random.random() > 0.3:
|
136
|
+
logging.info("Checking notifications, tags ...")
|
137
|
+
self.scrapler.download_hndlr(self.scrapler.cl.notification_like_and_comment_on_photo_user_tagged, "everyone")
|
138
|
+
self.random_pause()
|
139
|
+
|
129
140
|
if random.random() > 0.5:
|
130
141
|
logging.info("user_medias with target_user_id = '%s' ...", target_user_id)
|
131
|
-
self.scrapler.download_hndlr(self.scrapler.cl.
|
142
|
+
self.scrapler.download_hndlr(self.scrapler.cl.user_medias_v1, target_user_id, amount=random.randint(1, 5))
|
132
143
|
self.random_pause()
|
133
144
|
except Exception as e:
|
134
145
|
logging.warning("Error in profile view")
|
@@ -116,14 +116,13 @@ class AsyncDownloader(object):
|
|
116
116
|
time.sleep(2)
|
117
117
|
self.job_queue.put(job)
|
118
118
|
continue
|
119
|
-
actor = None
|
120
119
|
self.acc_selector.set_module(job.job_origin)
|
121
120
|
proxy = selector.get_current_proxy()
|
122
121
|
if job.job_origin is Origin.INSTAGRAM:
|
123
122
|
from warp_beacon.scraper.instagram.instagram import InstagramScraper
|
124
123
|
actor = InstagramScraper(selector.get_current(), proxy)
|
125
124
|
selector.inc_ig_request_count()
|
126
|
-
if selector.get_ig_request_count() >= int(os.environ.get("IG_REQUESTS_PER_ACCOUNT", default="
|
125
|
+
if selector.get_ig_request_count() >= int(os.environ.get("IG_REQUESTS_PER_ACCOUNT", default="10")):
|
127
126
|
logging.info("The account request limit has been reached. Selecting the next account.")
|
128
127
|
selector.reset_ig_request_count()
|
129
128
|
selector.next()
|
@@ -379,6 +378,9 @@ class AsyncDownloader(object):
|
|
379
378
|
logging.error("Error inside download worker!")
|
380
379
|
logging.exception(e)
|
381
380
|
self.notify_task_failed(job)
|
381
|
+
finally:
|
382
|
+
if actor:
|
383
|
+
actor.restore_gai()
|
382
384
|
except Empty:
|
383
385
|
pass
|
384
386
|
except Exception as e:
|
@@ -92,5 +92,7 @@ class ScraperAbstract(ABC):
|
|
92
92
|
urllib3_cn.allowed_gai_family = allowed_gai_family
|
93
93
|
|
94
94
|
def restore_gai(self) -> None:
|
95
|
-
|
96
|
-
|
95
|
+
if self.original_gai_family:
|
96
|
+
logging.info("Restoring normal IP stack ...")
|
97
|
+
urllib3_cn.allowed_gai_family = self.original_gai_family
|
98
|
+
self.original_gai_family = None
|
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
|