warp-beacon 2.3.1__tar.gz → 2.3.3__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.1/warp_beacon.egg-info → warp_beacon-2.3.3}/PKG-INFO +1 -1
- warp_beacon-2.3.3/warp_beacon/__version__.py +2 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/mediainfo/silencer.py +8 -5
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scraper/account_selector.py +7 -1
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scraper/instagram/instagram.py +11 -3
- {warp_beacon-2.3.1 → warp_beacon-2.3.3/warp_beacon.egg-info}/PKG-INFO +1 -1
- warp_beacon-2.3.1/warp_beacon/__version__.py +0 -2
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/LICENSE +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/MANIFEST.in +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/README.md +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/assets/placeholder.gif +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/etc/.gitignore +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/etc/accounts.json +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/etc/proxies.json +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/etc/warp_beacon.conf +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/etc/warp_beacon.service +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/pyproject.toml +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/setup.cfg +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/setup.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/__init__.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/compress/__init__.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/compress/video.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/jobs/__init__.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/jobs/abstract.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/jobs/download_job.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/jobs/types.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/jobs/upload_job.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/mediainfo/__init__.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/mediainfo/abstract.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/mediainfo/audio.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/mediainfo/video.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scheduler/__init__.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scheduler/scheduler.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scraper/__init__.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scraper/abstract.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scraper/exceptions.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scraper/fail_handler.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scraper/instagram/__init__.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scraper/link_resolver.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scraper/youtube/__init__.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scraper/youtube/abstract.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scraper/youtube/music.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scraper/youtube/shorts.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/scraper/youtube/youtube.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/storage/__init__.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/storage/mongo.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/telegram/__init__.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/telegram/bot.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/telegram/handlers.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/telegram/placeholder_message.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/telegram/utils.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/uploader/__init__.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon/warp_beacon.py +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon.egg-info/SOURCES.txt +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon.egg-info/dependency_links.txt +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon.egg-info/entry_points.txt +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon.egg-info/requires.txt +0 -0
- {warp_beacon-2.3.1 → warp_beacon-2.3.3}/warp_beacon.egg-info/top_level.txt +0 -0
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
#import numpy as np
|
1
|
+
import numpy as np
|
3
2
|
import av
|
4
3
|
|
5
4
|
from warp_beacon.mediainfo.video import VideoInfo
|
@@ -28,10 +27,14 @@ class Silencer(VideoInfo):
|
|
28
27
|
if packet:
|
29
28
|
out_container.mux(packet)
|
30
29
|
#
|
31
|
-
|
30
|
+
silent_samples = 64
|
31
|
+
silent_data = np.zeros((1, silent_samples), dtype=np.int16)
|
32
|
+
#aframe = av.AudioFrame(samples=64, format='s16')
|
33
|
+
aframe = av.AudioFrame.from_ndarray(silent_data, layout='mono')
|
32
34
|
aframe.pts = frame.pts
|
33
|
-
aframe.sample_rate =
|
34
|
-
aframe.rate = 44100
|
35
|
+
aframe.sample_rate = 44100
|
36
|
+
#aframe.rate = 44100
|
37
|
+
|
35
38
|
for packet in out_audio_stream.encode(aframe):
|
36
39
|
out_container.mux(packet)
|
37
40
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import os
|
2
|
+
import random
|
2
3
|
import json
|
3
4
|
import re
|
4
5
|
from typing import Optional
|
@@ -44,11 +45,16 @@ class AccountSelector(object):
|
|
44
45
|
if self.proxies:
|
45
46
|
try:
|
46
47
|
current_acc_pid = self.get_current()[1].get("proxy_id", "").strip()
|
48
|
+
matched_proxy = []
|
47
49
|
for proxy in self.proxies:
|
48
50
|
pid = proxy.get("id", "").strip()
|
49
51
|
if pid and current_acc_pid and pid == current_acc_pid:
|
50
52
|
logging.info("Account proxy matched '%s'", proxy)
|
51
|
-
|
53
|
+
matched_proxy.append(proxy)
|
54
|
+
if matched_proxy:
|
55
|
+
prox_choice = random.choice(matched_proxy)
|
56
|
+
logging.info("Chosen proxy: '%s'", prox_choice)
|
57
|
+
return prox_choice
|
52
58
|
except Exception as e:
|
53
59
|
logging.warning("Error on selecting account proxy!")
|
54
60
|
logging.exception(e)
|
@@ -33,6 +33,7 @@ INST_SESSION_FILE_TPL = "/var/warp_beacon/inst_session_account_%d.json"
|
|
33
33
|
class InstagramScraper(ScraperAbstract):
|
34
34
|
cl = None
|
35
35
|
inst_session_file = ""
|
36
|
+
timeline_cursor = {}
|
36
37
|
|
37
38
|
def __init__(self, account: tuple, proxy: dict=None) -> None:
|
38
39
|
super().__init__(account, proxy)
|
@@ -71,9 +72,11 @@ class InstagramScraper(ScraperAbstract):
|
|
71
72
|
})
|
72
73
|
|
73
74
|
def safe_write_session(self) -> None:
|
75
|
+
cl_settings = self.cl.get_settings()
|
76
|
+
cl_settings["warp_timeline_cursor"] = self.timeline_cursor
|
74
77
|
tmp_fname = "%s~" % self.inst_session_file
|
75
78
|
with open(tmp_fname, 'w+', encoding="utf-8") as f:
|
76
|
-
f.write(json.dumps(
|
79
|
+
f.write(json.dumps(cl_settings))
|
77
80
|
if os.path.exists(self.inst_session_file):
|
78
81
|
os.unlink(self.inst_session_file)
|
79
82
|
os.rename(tmp_fname, self.inst_session_file)
|
@@ -81,7 +84,12 @@ class InstagramScraper(ScraperAbstract):
|
|
81
84
|
def load_session(self) -> None:
|
82
85
|
if os.path.exists(self.inst_session_file):
|
83
86
|
logging.info("Loading existing session file '%s'", self.inst_session_file)
|
84
|
-
|
87
|
+
with open(self.inst_session_file, 'r', encoding="utf-8") as f:
|
88
|
+
js = json.loads(f.read())
|
89
|
+
if "warp_timeline_cursor" in js:
|
90
|
+
self.timeline_cursor = js.get("warp_timeline_cursor", {})
|
91
|
+
del js["warp_timeline_cursor"]
|
92
|
+
self.cl.set_settings(js)
|
85
93
|
else:
|
86
94
|
self._download_hndlr(self.login)
|
87
95
|
|
@@ -94,7 +102,7 @@ class InstagramScraper(ScraperAbstract):
|
|
94
102
|
|
95
103
|
def validate_session(self) -> None:
|
96
104
|
self.load_session()
|
97
|
-
self._download_hndlr(self.cl.get_timeline_feed)
|
105
|
+
self.timeline_cursor = self._download_hndlr(self.cl.get_timeline_feed, "pull_to_refresh", self.timeline_cursor.get("next_max_id", None))
|
98
106
|
self._download_hndlr(self.cl.get_reels_tray_feed, "pull_to_refresh")
|
99
107
|
self._download_hndlr(self.cl.direct_active_presence)
|
100
108
|
self._download_hndlr(self.cl.reels)
|
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
|