warp-beacon 2.2.33__py3-none-any.whl → 2.2.35__py3-none-any.whl
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.
- var/warp_beacon/accounts.json +13 -2
- warp_beacon/__version__.py +1 -1
- warp_beacon/scheduler/scheduler.py +2 -2
- warp_beacon/scraper/account_selector.py +3 -2
- warp_beacon/scraper/youtube/abstract.py +5 -3
- warp_beacon/telegram/bot.py +6 -2
- {warp_beacon-2.2.33.dist-info → warp_beacon-2.2.35.dist-info}/METADATA +1 -1
- {warp_beacon-2.2.33.dist-info → warp_beacon-2.2.35.dist-info}/RECORD +12 -12
- {warp_beacon-2.2.33.dist-info → warp_beacon-2.2.35.dist-info}/LICENSE +0 -0
- {warp_beacon-2.2.33.dist-info → warp_beacon-2.2.35.dist-info}/WHEEL +0 -0
- {warp_beacon-2.2.33.dist-info → warp_beacon-2.2.35.dist-info}/entry_points.txt +0 -0
- {warp_beacon-2.2.33.dist-info → warp_beacon-2.2.35.dist-info}/top_level.txt +0 -0
var/warp_beacon/accounts.json
CHANGED
@@ -27,7 +27,8 @@
|
|
27
27
|
"cpu": "exynos2100",
|
28
28
|
"version_code": "493450264"
|
29
29
|
}
|
30
|
-
}
|
30
|
+
},
|
31
|
+
"account_admins": "@BelisariusCawl"
|
31
32
|
},
|
32
33
|
{
|
33
34
|
"login": "ig_account1",
|
@@ -55,7 +56,17 @@
|
|
55
56
|
"cpu": "exynos2100",
|
56
57
|
"version_code": "493450264"
|
57
58
|
}
|
58
|
-
}
|
59
|
+
},
|
60
|
+
"account_admins": "@BelisariusCawl"
|
61
|
+
}
|
62
|
+
],
|
63
|
+
"youtube":
|
64
|
+
[
|
65
|
+
{
|
66
|
+
"account_admins": "@BelisariusCawl"
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"account_admins": "@Lazyteh"
|
59
70
|
}
|
60
71
|
]
|
61
72
|
}
|
warp_beacon/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
__version__ = "2.2.
|
1
|
+
__version__ = "2.2.35"
|
2
2
|
|
@@ -15,7 +15,7 @@ class IGScheduler(object):
|
|
15
15
|
running = True
|
16
16
|
thread = None
|
17
17
|
event = None
|
18
|
-
state = {"remaining": randrange(
|
18
|
+
state = {"remaining": randrange(6800, 20800)}
|
19
19
|
|
20
20
|
def __init__(self, downloader: warp_beacon.scraper.AsyncDownloader) -> None:
|
21
21
|
self.downloader = downloader
|
@@ -82,7 +82,7 @@ class IGScheduler(object):
|
|
82
82
|
while self.running:
|
83
83
|
try:
|
84
84
|
if self.state["remaining"] <= 0:
|
85
|
-
self.state["remaining"] = randrange(
|
85
|
+
self.state["remaining"] = randrange(6800, 20800)
|
86
86
|
logging.info("Next scheduler activity in '%s' seconds", self.state["remaining"])
|
87
87
|
|
88
88
|
start_time = time.time()
|
@@ -42,10 +42,11 @@ class AccountSelector(object):
|
|
42
42
|
# for k, v in self.accounts.items():
|
43
43
|
|
44
44
|
def load_yt_sessions(self) -> None:
|
45
|
-
|
45
|
+
if "youtube" not in self.accounts:
|
46
|
+
self.accounts["youtube"] = []
|
46
47
|
for f in os.listdir(self.session_dir):
|
47
48
|
if "yt_session" in f and ".json" in f:
|
48
|
-
match = re.search('\d+', f)
|
49
|
+
match = re.search(r'\d+', f)
|
49
50
|
index = 0
|
50
51
|
if match:
|
51
52
|
index = int(match.group(0))
|
@@ -10,10 +10,10 @@ import json
|
|
10
10
|
import urllib
|
11
11
|
import requests
|
12
12
|
import http.client
|
13
|
-
from PIL import Image
|
13
|
+
from PIL import Image
|
14
14
|
|
15
15
|
from warp_beacon.scraper.abstract import ScraperAbstract
|
16
|
-
from warp_beacon.mediainfo.abstract import MediaInfoAbstract
|
16
|
+
#from warp_beacon.mediainfo.abstract import MediaInfoAbstract
|
17
17
|
from warp_beacon.scraper.exceptions import TimeOut, Unavailable, extract_exception_message
|
18
18
|
|
19
19
|
from pytubefix import YouTube
|
@@ -50,6 +50,7 @@ def patched_fetch_bearer_token(self) -> None:
|
|
50
50
|
f"Please open {verification_url} and input code `{user_code}`.\n\n"
|
51
51
|
"Please select a Google account with verified age.\n"
|
52
52
|
"This will allow you to avoid error the **AgeRestrictedError** when accessing some content.",
|
53
|
+
account_admins=self.wb_account.get("account_admins", None),
|
53
54
|
yt_auth=True)
|
54
55
|
self.auth_event.wait()
|
55
56
|
|
@@ -119,7 +120,7 @@ class YoutubeAbstract(ScraperAbstract):
|
|
119
120
|
|
120
121
|
if aspect_ratio_height > 4:
|
121
122
|
image = image.resize((image.size[0], image.size[1]+new_image.size[1]))
|
122
|
-
height += new_image.size[1] - 5
|
123
|
+
#height += new_image.size[1] - 5
|
123
124
|
|
124
125
|
paste_position = ((target_width - width) // 2, (target_height - height) // 2)
|
125
126
|
new_image.paste(image, paste_position)
|
@@ -201,6 +202,7 @@ class YoutubeAbstract(ScraperAbstract):
|
|
201
202
|
def build_yt(self, url: str) -> YouTube:
|
202
203
|
InnerTube.send_message_to_admin_func = self.send_message_to_admin_func
|
203
204
|
InnerTube.auth_event = self.auth_event
|
205
|
+
InnerTube.wb_account = self.account
|
204
206
|
InnerTube.fetch_bearer_token = patched_fetch_bearer_token
|
205
207
|
_default_clients["ANDROID"]["innertube_context"]["context"]["client"]["clientVersion"] = "19.08.35"
|
206
208
|
_default_clients["ANDROID_MUSIC"] = _default_clients["ANDROID"]
|
warp_beacon/telegram/bot.py
CHANGED
@@ -118,9 +118,13 @@ class Bot(object):
|
|
118
118
|
|
119
119
|
return 0
|
120
120
|
|
121
|
-
async def send_text_to_admin(self, text: str, yt_auth: bool = False) -> list[int]:
|
121
|
+
async def send_text_to_admin(self, text: str, account_admins: str = None, yt_auth: bool = False) -> list[int]:
|
122
122
|
try:
|
123
|
-
admins =
|
123
|
+
admins = None
|
124
|
+
if account_admins:
|
125
|
+
admins = account_admins
|
126
|
+
if not admins:
|
127
|
+
admins = os.environ.get("TG_BOT_ADMINS_USERNAMES", None)
|
124
128
|
if not admins:
|
125
129
|
raise ValueError("Configuration value `TG_BOT_ADMIN_USERNAME` is empty!")
|
126
130
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
etc/warp_beacon/warp_beacon.conf,sha256=LNq6YThFSadZKGrsAfMVFWX7liBwePAXeApdEz9ZppE,317
|
2
2
|
lib/systemd/system/warp_beacon.service,sha256=lPmHqLqcI2eIV7nwHS0qcALQrznixqJuwwPfa2mDLUA,372
|
3
|
-
var/warp_beacon/accounts.json,sha256=
|
3
|
+
var/warp_beacon/accounts.json,sha256=2QQMS9N_Z-TnfZq4U1vSUe4IKyZGmTFdgo8BoF4hQ7E,1710
|
4
4
|
var/warp_beacon/placeholder.gif,sha256=cE5CGJVaop4Sx21zx6j4AyoHU0ncmvQuS2o6hJfEH88,6064
|
5
5
|
warp_beacon/__init__.py,sha256=_rThNODmz0nDp_n4mWo_HKaNFE5jk1_7cRhHyYaencI,163
|
6
|
-
warp_beacon/__version__.py,sha256=
|
6
|
+
warp_beacon/__version__.py,sha256=_mSYNJufyORYMK1rsArF8jh6Q8Jr1RLn3XuWPx3TkaQ,24
|
7
7
|
warp_beacon/warp_beacon.py,sha256=7KEtZDj-pdhtl6m-zFLsSojs1ZR4o7L0xbqtdmYPvfE,342
|
8
8
|
warp_beacon/compress/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
9
|
warp_beacon/compress/video.py,sha256=_PDMVYCyzLYxHv1uZmmzGcG_8rjaZr7BTXsXTTy_oS4,2846
|
@@ -18,28 +18,28 @@ warp_beacon/mediainfo/audio.py,sha256=ous88kwQj4bDIChN5wnGil5LqTs0IQHH0d-nyrL0-Z
|
|
18
18
|
warp_beacon/mediainfo/silencer.py,sha256=MgUc9Ibbhjhg9GbJMNfJqrdDkMsQShZkQ1sCwvW_-qI,1647
|
19
19
|
warp_beacon/mediainfo/video.py,sha256=DXHiWAOyJPSVXQ0OP7uOBikUFT7noFmMaMSIx04Mhs4,2506
|
20
20
|
warp_beacon/scheduler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
|
-
warp_beacon/scheduler/scheduler.py,sha256=
|
21
|
+
warp_beacon/scheduler/scheduler.py,sha256=oKuDP3RqUQmNYBorKxnhz9QqA-eLTJHVTinWbsYB530,2585
|
22
22
|
warp_beacon/scraper/__init__.py,sha256=tkl7UyfqFcvPlxomVPB9GpWQvAoADaM6jGb_bmx1zRY,15229
|
23
23
|
warp_beacon/scraper/abstract.py,sha256=aNZ9ypF9B8BjflcIwi-7wEzIqF-XPeF0xvfX9CP_iIw,2708
|
24
|
-
warp_beacon/scraper/account_selector.py,sha256=
|
24
|
+
warp_beacon/scraper/account_selector.py,sha256=9EdeSN3nAOS9jA_4c5t7skUd0LZGwERRn60lYzHriM4,3425
|
25
25
|
warp_beacon/scraper/exceptions.py,sha256=lHsPrYy5iYnHsIdUHqRxZmzlqrkNj_TS4TkiTJfWhTs,1326
|
26
26
|
warp_beacon/scraper/instagram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
27
|
warp_beacon/scraper/instagram/instagram.py,sha256=D_r6Kdpe4iBjCeGv-vVIodiVnZps6ZyBbaY0JC7mGWI,13782
|
28
28
|
warp_beacon/scraper/youtube/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
|
-
warp_beacon/scraper/youtube/abstract.py,sha256=
|
29
|
+
warp_beacon/scraper/youtube/abstract.py,sha256=7P0GN7DSkoJWmhI-wIeW29_TtN3CDR-RwbK41kMv10c,7726
|
30
30
|
warp_beacon/scraper/youtube/music.py,sha256=nbTDFdgXGbTNqttE828DEgvSc8-SuAsQAHeqUwU6yFM,1484
|
31
31
|
warp_beacon/scraper/youtube/shorts.py,sha256=RqMYDq4XHChtp-LdlxXyHej4h3NI3Qi9T8USxwk-pIk,1177
|
32
32
|
warp_beacon/scraper/youtube/youtube.py,sha256=JvN5pVz0jtxCY9FGMl1dIg5Ccr2Kulaoxtym0Vb1QwQ,2224
|
33
33
|
warp_beacon/storage/__init__.py,sha256=m86MDXBMtZZsTPLI2cD-pM5Xkh2g2NYVvp_dtW8eH0Q,3548
|
34
34
|
warp_beacon/telegram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
|
-
warp_beacon/telegram/bot.py,sha256=
|
35
|
+
warp_beacon/telegram/bot.py,sha256=yqqA9UFOnSA0XwgbIVnPyIPhGU8o0l-Gs3Dsx_agOFY,15383
|
36
36
|
warp_beacon/telegram/handlers.py,sha256=xSNG_v4D4FaA5q1_5wXvJkjcDUhy5GaQnfpijJZpnPk,7039
|
37
37
|
warp_beacon/telegram/placeholder_message.py,sha256=32U-R_IMPRJd-S5UwlpemLkArJOxCmO7whcynduSbMA,6418
|
38
38
|
warp_beacon/telegram/utils.py,sha256=CeWXMwyzv2l4Af6I-wW2ySU490c-5k82sBhkjabv0n4,2452
|
39
39
|
warp_beacon/uploader/__init__.py,sha256=rsUkzzmtaeQY-kNkcIiPsrayS9idFKY3hBC71mR19XE,4743
|
40
|
-
warp_beacon-2.2.
|
41
|
-
warp_beacon-2.2.
|
42
|
-
warp_beacon-2.2.
|
43
|
-
warp_beacon-2.2.
|
44
|
-
warp_beacon-2.2.
|
45
|
-
warp_beacon-2.2.
|
40
|
+
warp_beacon-2.2.35.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
41
|
+
warp_beacon-2.2.35.dist-info/METADATA,sha256=EA5xhddXLYRykI2ZeZ4pV1RO8od_sIIVt_4YhuKesxw,21251
|
42
|
+
warp_beacon-2.2.35.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
43
|
+
warp_beacon-2.2.35.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
|
44
|
+
warp_beacon-2.2.35.dist-info/top_level.txt,sha256=ALb_Ft_eG-OY4_m0TWUifNUOZsrx483L-zw7G7vqXoc,971
|
45
|
+
warp_beacon-2.2.35.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|