warp-beacon 2.6.36__tar.gz → 2.6.38__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.6.36/warp_beacon.egg-info → warp_beacon-2.6.38}/PKG-INFO +1 -1
- warp_beacon-2.6.38/warp_beacon/__version__.py +2 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/__init__.py +0 -3
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/account_selector.py +18 -13
- {warp_beacon-2.6.36 → warp_beacon-2.6.38/warp_beacon.egg-info}/PKG-INFO +1 -1
- warp_beacon-2.6.36/warp_beacon/__version__.py +0 -2
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/LICENSE +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/MANIFEST.in +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/README.md +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/assets/placeholder.gif +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/etc/.gitignore +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/etc/accounts.json +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/etc/proxies.json +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/etc/warp_beacon.conf +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/etc/warp_beacon.service +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/pyproject.toml +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/setup.cfg +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/setup.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/__init__.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/compress/__init__.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/compress/video.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/jobs/__init__.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/jobs/abstract.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/jobs/download_job.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/jobs/types.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/jobs/upload_job.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/mediainfo/__init__.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/mediainfo/abstract.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/mediainfo/audio.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/mediainfo/silencer.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/mediainfo/video.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scheduler/__init__.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scheduler/instagram_human.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scheduler/scheduler.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/abstract.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/exceptions.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/fail_handler.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/instagram/__init__.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/instagram/captcha.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/instagram/instagram.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/link_resolver.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/utils.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/youtube/__init__.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/youtube/abstract.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/youtube/music.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/youtube/shorts.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/scraper/youtube/youtube.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/storage/__init__.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/storage/mongo.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/telegram/__init__.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/telegram/bot.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/telegram/caption_shortener.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/telegram/handlers.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/telegram/placeholder_message.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/telegram/utils.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/uploader/__init__.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/warp_beacon.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon/yt_auth.py +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon.egg-info/SOURCES.txt +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon.egg-info/dependency_links.txt +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon.egg-info/entry_points.txt +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon.egg-info/requires.txt +0 -0
- {warp_beacon-2.6.36 → warp_beacon-2.6.38}/warp_beacon.egg-info/top_level.txt +0 -0
@@ -56,9 +56,6 @@ class AsyncDownloader(object):
|
|
56
56
|
if os.environ.get("TG_PREMIUM", default="false") == "true":
|
57
57
|
self.TG_FILE_LIMIT = 4294967296 # 4 GiB
|
58
58
|
|
59
|
-
def __del__(self) -> None:
|
60
|
-
self.stop_all()
|
61
|
-
|
62
59
|
def start(self) -> None:
|
63
60
|
for _ in range(self.workers_count):
|
64
61
|
proc = multiprocessing.Process(target=self.do_work, args=(self.acc_selector, self.process_context))
|
@@ -26,13 +26,16 @@ class AccountSelector(object):
|
|
26
26
|
current_proxy = None
|
27
27
|
ig_request_count = None
|
28
28
|
ig_accounts_session_id = None
|
29
|
+
lock = None
|
29
30
|
|
30
31
|
def __init__(self, manager: multiprocessing.managers.SyncManager, acc_file_path: str, proxy_file_path: str=None) -> None:
|
31
32
|
self.accounts = []
|
32
33
|
self.proxies = []
|
33
34
|
self.account_index = {}
|
34
|
-
self.ig_accounts_session_id = self.load_ig_sessions_id()
|
35
35
|
self.manager = manager
|
36
|
+
self.lock = self.manager.Lock()
|
37
|
+
self.ig_accounts_session_id = self.manager.dict()
|
38
|
+
self.load_ig_sessions_id()
|
36
39
|
self.accounts_meta_data = self.manager.dict()
|
37
40
|
if os.path.exists(acc_file_path):
|
38
41
|
with open(acc_file_path, 'r', encoding="utf-8") as f:
|
@@ -63,19 +66,20 @@ class AccountSelector(object):
|
|
63
66
|
logging.warning("Failed to save session ig_session_client_id!")
|
64
67
|
logging.exception(e)
|
65
68
|
|
66
|
-
def load_ig_sessions_id(self) ->
|
67
|
-
ig_sessions_client_id = {}
|
69
|
+
def load_ig_sessions_id(self) -> None:
|
68
70
|
try:
|
69
71
|
sess_file = f"{self.session_dir}/ig_sessions_client_id.json"
|
70
72
|
if os.path.exists(sess_file):
|
73
|
+
data = None
|
71
74
|
with open(sess_file, 'r', encoding="utf-8") as f:
|
72
|
-
|
75
|
+
data = json.loads(f.read())
|
76
|
+
if data and isinstance(data, dict):
|
77
|
+
for k, v in data.items():
|
78
|
+
self.ig_accounts_session_id[k] = v
|
73
79
|
except Exception as e:
|
74
80
|
logging.warning("Failed to read session ig_session_client_id!")
|
75
81
|
logging.exception(e)
|
76
82
|
|
77
|
-
return ig_sessions_client_id
|
78
|
-
|
79
83
|
def save_ig_request_count(self) -> None:
|
80
84
|
try:
|
81
85
|
state = {"ig_count": self.ig_request_count.value}
|
@@ -259,11 +263,12 @@ class AccountSelector(object):
|
|
259
263
|
return self.ig_request_count.value
|
260
264
|
|
261
265
|
def get_ig_session_id(self) -> str:
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
else:
|
266
|
-
if random.random() > 0.95:
|
266
|
+
with self.lock:
|
267
|
+
idx = self.account_index[self.current_module_name].value
|
268
|
+
if idx not in self.ig_accounts_session_id:
|
267
269
|
self.ig_accounts_session_id[idx] = str(uuid.uuid4())
|
268
|
-
|
269
|
-
|
270
|
+
else:
|
271
|
+
if random.random() > 0.95:
|
272
|
+
self.ig_accounts_session_id[idx] = str(uuid.uuid4())
|
273
|
+
logging.info("Rotated client_session_id — simulating app restart")
|
274
|
+
return self.ig_accounts_session_id[idx]
|
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
|
File without changes
|
File without changes
|
File without changes
|