warp-beacon 2.6.49__py3-none-any.whl → 2.6.51__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.
- warp_beacon/__version__.py +1 -1
- warp_beacon/scraper/abstract.py +8 -11
- warp_beacon/scraper/youtube/abstract.py +4 -2
- warp_beacon/telegram/progress_bar.py +2 -2
- {warp_beacon-2.6.49.dist-info → warp_beacon-2.6.51.dist-info}/METADATA +1 -1
- {warp_beacon-2.6.49.dist-info → warp_beacon-2.6.51.dist-info}/RECORD +10 -10
- {warp_beacon-2.6.49.dist-info → warp_beacon-2.6.51.dist-info}/WHEEL +0 -0
- {warp_beacon-2.6.49.dist-info → warp_beacon-2.6.51.dist-info}/entry_points.txt +0 -0
- {warp_beacon-2.6.49.dist-info → warp_beacon-2.6.51.dist-info}/licenses/LICENSE +0 -0
- {warp_beacon-2.6.49.dist-info → warp_beacon-2.6.51.dist-info}/top_level.txt +0 -0
warp_beacon/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
__version__ = "2.6.
|
1
|
+
__version__ = "2.6.51"
|
2
2
|
|
warp_beacon/scraper/abstract.py
CHANGED
@@ -1,18 +1,15 @@
|
|
1
1
|
import os
|
2
2
|
import pathlib
|
3
|
-
|
4
|
-
import socket
|
5
|
-
import requests.packages.urllib3.util.connection as urllib3_cn
|
6
|
-
import multiprocessing
|
7
|
-
|
8
3
|
from abc import ABC, abstractmethod
|
9
4
|
from typing import Callable, Union
|
5
|
+
import logging
|
6
|
+
import multiprocessing
|
7
|
+
import socket
|
8
|
+
import requests.packages.urllib3.util.connection as urllib3_cn
|
10
9
|
|
11
10
|
from PIL import Image
|
12
11
|
from pillow_heif import register_heif_opener
|
13
12
|
|
14
|
-
import logging
|
15
|
-
|
16
13
|
class ScraperAbstract(ABC):
|
17
14
|
original_gai_family = None
|
18
15
|
send_message_to_admin_func: Callable = lambda: None
|
@@ -48,8 +45,8 @@ class ScraperAbstract(ABC):
|
|
48
45
|
if os.path.exists(src_file):
|
49
46
|
path_info = pathlib.Path(src_file)
|
50
47
|
old_filename = path_info.stem
|
51
|
-
new_filename = "
|
52
|
-
new_filepath = "
|
48
|
+
new_filename = f"{old_filename}_converted.png"
|
49
|
+
new_filepath = f"{os.path.dirname(src_file)}/{new_filename}"
|
53
50
|
with Image.open(src_file).convert('RGB') as img:
|
54
51
|
img.save(new_filepath, 'png')
|
55
52
|
os.unlink(src_file)
|
@@ -67,8 +64,8 @@ class ScraperAbstract(ABC):
|
|
67
64
|
register_heif_opener()
|
68
65
|
path_info = pathlib.Path(src_file)
|
69
66
|
old_filename = path_info.stem
|
70
|
-
new_filename = "
|
71
|
-
new_filepath = "
|
67
|
+
new_filename = f"{old_filename}_converted.png"
|
68
|
+
new_filepath = f"{os.path.dirname(src_file)}/{new_filename}"
|
72
69
|
with Image.open(src_file).convert('RGB') as img:
|
73
70
|
img.save(new_filepath, 'png')
|
74
71
|
os.unlink(src_file)
|
@@ -232,8 +232,10 @@ class YoutubeAbstract(ScraperAbstract):
|
|
232
232
|
return ret_val
|
233
233
|
|
234
234
|
def yt_on_progress(self, stream: Stream, chunk: bytes, bytes_remaining: int) -> None:
|
235
|
-
|
236
|
-
|
235
|
+
total_size = stream.filesize or stream.filesize_approx
|
236
|
+
bytes_downloaded = total_size - bytes_remaining
|
237
|
+
percentage_of_completion = bytes_downloaded / total_size * 100
|
238
|
+
logging.info("Downloaded %d%%", percentage_of_completion)
|
237
239
|
|
238
240
|
def build_proxies(self, proxy_dsn: str) -> dict:
|
239
241
|
if not proxy_dsn:
|
@@ -28,7 +28,7 @@ class ProgressBar(object):
|
|
28
28
|
# building bar
|
29
29
|
pbar = '█' * filled + half_block + '─' * (length - filled - len(half_block))
|
30
30
|
percent = frac * 100
|
31
|
-
return f"<b>[{pbar}] {round(percent)}
|
31
|
+
return f"<b>[{pbar}] {round(percent)}%</b>"
|
32
32
|
|
33
33
|
def make_emoji_progress_bar(self, current: int, total: int, length: int = 10) -> str:
|
34
34
|
"""
|
@@ -50,7 +50,7 @@ class ProgressBar(object):
|
|
50
50
|
pbar = self.make_emoji_progress_bar(percent, 100, 14)
|
51
51
|
logging.info("[%s] Uploaded to Telegram %d%%", label, percent)
|
52
52
|
try:
|
53
|
-
await self.client.edit_message_caption(chat_id, message_id, f"{pbar} <b>Uploading
|
53
|
+
await self.client.edit_message_caption(chat_id, message_id, f"{pbar} <b>Uploading</b> {label}", ParseMode.HTML)
|
54
54
|
except MessageNotModified:
|
55
55
|
logging.warning("bad_request_400.MessageNotModified")
|
56
56
|
except Exception as e:
|
@@ -4,7 +4,7 @@ var/warp_beacon/accounts.json,sha256=OsXdncs6h88xrF_AP6_WDCK1waGBn9SR-uYdIeK37GM
|
|
4
4
|
var/warp_beacon/placeholder.gif,sha256=cE5CGJVaop4Sx21zx6j4AyoHU0ncmvQuS2o6hJfEH88,6064
|
5
5
|
var/warp_beacon/proxies.json,sha256=VnjlQDXumOEq72ZFjbh6IqHS1TEHqn8HPYAZqWCeSIA,95
|
6
6
|
warp_beacon/__init__.py,sha256=_rThNODmz0nDp_n4mWo_HKaNFE5jk1_7cRhHyYaencI,163
|
7
|
-
warp_beacon/__version__.py,sha256=
|
7
|
+
warp_beacon/__version__.py,sha256=97aVkVvphE-RNmc19iil89QyOmg2AptM2VnjP0DOdho,24
|
8
8
|
warp_beacon/warp_beacon.py,sha256=ED43vNzdjDUJ_9qLCbri0bjWLWEJ69BENGj9i7G6AvM,342
|
9
9
|
warp_beacon/yt_auth.py,sha256=GUTKqYr_tzDC-07Lx_ahWXSag8EyLxXBUnQbDBIkEmk,6022
|
10
10
|
warp_beacon/compress/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -23,7 +23,7 @@ warp_beacon/scheduler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
23
23
|
warp_beacon/scheduler/instagram_human.py,sha256=0LaRUu0MBBuEOQeFzuq22HIYfJL9pTK_7udsXfef0Fk,8204
|
24
24
|
warp_beacon/scheduler/scheduler.py,sha256=9OCh7Ta4wY_aTHGAOOZmaKXg56Ftx1N_aV1g6E3ZLKA,4941
|
25
25
|
warp_beacon/scraper/__init__.py,sha256=NAx81O85yP0vUP1uZ9VHZlXh-zZgN_LHm7gWcU5BV18,19982
|
26
|
-
warp_beacon/scraper/abstract.py,sha256=
|
26
|
+
warp_beacon/scraper/abstract.py,sha256=lra97QidGcSvoXgQh2-aGAO-DAgQU_u-ORQJ3BY-un4,2950
|
27
27
|
warp_beacon/scraper/account_selector.py,sha256=-tAbOIbM7sC9QafsgSe64RCWXewRO-RehEYsYSB3HGo,9727
|
28
28
|
warp_beacon/scraper/exceptions.py,sha256=EKwoF0oH2xZWbNU-v8DOaWK5skKwa3s1yTIBdlcfMpc,1452
|
29
29
|
warp_beacon/scraper/fail_handler.py,sha256=zcPK3ZVEsu6JmHYcWP7L3naTRK3gWFVRkpP84VBOtJs,964
|
@@ -33,7 +33,7 @@ warp_beacon/scraper/instagram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
|
|
33
33
|
warp_beacon/scraper/instagram/captcha.py,sha256=9UYziuqB3Tsat_ET6ex-cnZDbi6yCnsXHSpmE8MuUHk,4651
|
34
34
|
warp_beacon/scraper/instagram/instagram.py,sha256=zbkF-1lU5lxJ_2m8i8mGRX0EQMLVSflsOafBM1FEC6s,15588
|
35
35
|
warp_beacon/scraper/youtube/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
36
|
-
warp_beacon/scraper/youtube/abstract.py,sha256
|
36
|
+
warp_beacon/scraper/youtube/abstract.py,sha256=-7ha34z6bWc5rA7BZdA3x3Mw9ELghGYoHklDbZQYgTo,12689
|
37
37
|
warp_beacon/scraper/youtube/music.py,sha256=5AeSBQyUgVCJT2hoBCV2WvlyuV9US09SYJhmBG_P9F8,2755
|
38
38
|
warp_beacon/scraper/youtube/shorts.py,sha256=1GtoYUlxAwcgSQcn80u5ehNJytH5AN5dPOicmX-XD8E,1705
|
39
39
|
warp_beacon/scraper/youtube/youtube.py,sha256=x9v9p1coA9TvBhxjNAofGu4UBkAEdYPE2ePRnU-5tK0,7233
|
@@ -45,13 +45,13 @@ warp_beacon/telegram/caption_shortener.py,sha256=EnguNCF52ne7y4P-iJAbI6K3sqoJqJb
|
|
45
45
|
warp_beacon/telegram/edit_message.py,sha256=XDGBbQ3c6xzQsqwJ2ufVozgDZh3oWF-JQlk3wk78soo,5556
|
46
46
|
warp_beacon/telegram/handlers.py,sha256=uvR6TPHSqdSxigp3wR-ewiE6t3TvVcbVLVcYGwkgD2s,9559
|
47
47
|
warp_beacon/telegram/placeholder_message.py,sha256=wN9-BRiyrtHG-EvXtZkGJHt2CX71munQ57ITttjt0mw,6400
|
48
|
-
warp_beacon/telegram/progress_bar.py,sha256=
|
48
|
+
warp_beacon/telegram/progress_bar.py,sha256=KcS-cswDo-sShgOKionqNEpexs-o9e4qqFAtPf45Rlw,2375
|
49
49
|
warp_beacon/telegram/progress_file_reader.py,sha256=e3equyNKlKs764AD-iE9QRsh3YDHTzP78Mx5tdvPPWs,969
|
50
50
|
warp_beacon/telegram/utils.py,sha256=1Lq67aRylVJzbwSyvAgjPAGjJZFATkICvAj3TJGuJiM,4635
|
51
51
|
warp_beacon/uploader/__init__.py,sha256=j3qcuKhpchseZLGzSsSiogqe6WdMbkK8d3I-ConhNRs,5687
|
52
|
-
warp_beacon-2.6.
|
53
|
-
warp_beacon-2.6.
|
54
|
-
warp_beacon-2.6.
|
55
|
-
warp_beacon-2.6.
|
56
|
-
warp_beacon-2.6.
|
57
|
-
warp_beacon-2.6.
|
52
|
+
warp_beacon-2.6.51.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
53
|
+
warp_beacon-2.6.51.dist-info/METADATA,sha256=vVqQnB1spafaejdnk_OxfPCvZyB8vj4zHHXBt6qFzWQ,22706
|
54
|
+
warp_beacon-2.6.51.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
55
|
+
warp_beacon-2.6.51.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
|
56
|
+
warp_beacon-2.6.51.dist-info/top_level.txt,sha256=pYstFq5qRCQuQc4fOAAc1ti5UwsYldTREx7h2dNplI4,1297
|
57
|
+
warp_beacon-2.6.51.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|