warp-beacon 2.2.9__py3-none-any.whl → 2.2.11__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/youtube/abstract.py +2 -2
- warp_beacon/telegram/bot.py +6 -5
- warp_beacon/telegram/placeholder_message.py +9 -9
- {warp_beacon-2.2.9.dist-info → warp_beacon-2.2.11.dist-info}/METADATA +1 -1
- {warp_beacon-2.2.9.dist-info → warp_beacon-2.2.11.dist-info}/RECORD +10 -10
- {warp_beacon-2.2.9.dist-info → warp_beacon-2.2.11.dist-info}/LICENSE +0 -0
- {warp_beacon-2.2.9.dist-info → warp_beacon-2.2.11.dist-info}/WHEEL +0 -0
- {warp_beacon-2.2.9.dist-info → warp_beacon-2.2.11.dist-info}/entry_points.txt +0 -0
- {warp_beacon-2.2.9.dist-info → warp_beacon-2.2.11.dist-info}/top_level.txt +0 -0
warp_beacon/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
__version__ = "2.2.
|
1
|
+
__version__ = "2.2.11"
|
2
2
|
|
@@ -107,9 +107,9 @@ class YoutubeAbstract(ScraperAbstract):
|
|
107
107
|
logging.info("Youtube thumbnail url '%s'", url)
|
108
108
|
with urllib.request.urlopen(url, timeout=timeout) as f:
|
109
109
|
image = Image.open(io.BytesIO(f.read()))
|
110
|
-
image = MediaInfoAbstract.shrink_image_to_fit(image)
|
110
|
+
image = MediaInfoAbstract.shrink_image_to_fit(image, size=(320, 240))
|
111
111
|
io_buf = io.BytesIO()
|
112
|
-
image.save(io_buf, format='JPEG', subsampling=0, quality=100)
|
112
|
+
image.save(io_buf, format='JPEG', subsampling=0, quality=100, progressive=True, optimize=False, icc_profile=image.info.get('icc_profile'))
|
113
113
|
io_buf.seek(0)
|
114
114
|
return io_buf
|
115
115
|
except Exception as e:
|
warp_beacon/telegram/bot.py
CHANGED
@@ -320,6 +320,7 @@ class Bot(object):
|
|
320
320
|
else:
|
321
321
|
args["disable_notification"] = True
|
322
322
|
#args["reply_to_message_id"] = job.message_id
|
323
|
+
args["reply_to_message_id"] = None
|
323
324
|
|
324
325
|
if os.environ.get("ENABLE_DONATES", None) == "true" and job.media_type is not JobType.COLLECTION:
|
325
326
|
args["reply_markup"] = InlineKeyboardMarkup([[InlineKeyboardButton("❤ Donate", url=os.environ.get("DONATE_LINK", "https://pay.cryptocloud.plus/pos/W5BMtNQt5bJFoW2E"))]])
|
@@ -368,12 +369,12 @@ class Bot(object):
|
|
368
369
|
elif job.media_type == JobType.COLLECTION:
|
369
370
|
col_job_args = self.build_tg_args(job)
|
370
371
|
sent_messages = []
|
372
|
+
snd_grp_options = {"chat_id": job.chat_id, "reply_to_message_id": job.message_id}
|
373
|
+
if job.chat_type in (ChatType.GROUP, ChatType.SUPERGROUP):
|
374
|
+
snd_grp_options["reply_to_message_id"] = None
|
371
375
|
for i, media_chunk in enumerate(col_job_args["media"]):
|
372
|
-
|
373
|
-
|
374
|
-
#reply_to_message_id=job.message_id,
|
375
|
-
media=media_chunk
|
376
|
-
)
|
376
|
+
snd_grp_options["media"] = media_chunk
|
377
|
+
messages = await self.client.send_media_group(**snd_grp_options)
|
377
378
|
sent_messages += messages
|
378
379
|
if job.media_collection:
|
379
380
|
for j, _ in enumerate(media_chunk):
|
@@ -42,8 +42,8 @@ class PlaceholderMessage(object):
|
|
42
42
|
chat_id=chat_id,
|
43
43
|
animation=self.placeholder.tg_file_id,
|
44
44
|
caption=text,
|
45
|
-
|
46
|
-
|
45
|
+
reply_to_message_id=reply_id,
|
46
|
+
parse_mode=ParseMode.MARKDOWN
|
47
47
|
)
|
48
48
|
|
49
49
|
return reply
|
@@ -53,8 +53,8 @@ class PlaceholderMessage(object):
|
|
53
53
|
chat_id=chat_id,
|
54
54
|
photo=self.placeholder.tg_file_id,
|
55
55
|
caption=text,
|
56
|
-
|
57
|
-
|
56
|
+
reply_to_message_id=reply_id,
|
57
|
+
parse_mode=ParseMode.MARKDOWN
|
58
58
|
)
|
59
59
|
|
60
60
|
return reply
|
@@ -64,8 +64,8 @@ class PlaceholderMessage(object):
|
|
64
64
|
chat_id=chat_id,
|
65
65
|
document=self.placeholder.tg_file_id,
|
66
66
|
caption=text,
|
67
|
-
|
68
|
-
|
67
|
+
reply_to_message_id=reply_id,
|
68
|
+
parse_mode=ParseMode.MARKDOWN
|
69
69
|
)
|
70
70
|
|
71
71
|
return reply
|
@@ -110,8 +110,8 @@ class PlaceholderMessage(object):
|
|
110
110
|
chat_id=chat_id,
|
111
111
|
animation="https://bagrintsev.me/warp_beacon/placeholder_that_we_deserve.mp4",
|
112
112
|
caption=text,
|
113
|
-
|
114
|
-
|
113
|
+
reply_to_message_id=reply_id,
|
114
|
+
parse_mode=ParseMode.MARKDOWN
|
115
115
|
)
|
116
116
|
self.placeholder = PlaceHolder(PlaceholderType.ANIMATION, Utils.extract_file_id(reply))
|
117
117
|
except Exception as e:
|
@@ -119,7 +119,7 @@ class PlaceholderMessage(object):
|
|
119
119
|
logging.exception(e)
|
120
120
|
img = self.create_default_placeholder_img("Loading, this may take a moment ...")
|
121
121
|
reply = await self.bot.client.send_photo(
|
122
|
-
chat_id=
|
122
|
+
chat_id=chat_id,
|
123
123
|
parse_mode=ParseMode.MARKDOWN,
|
124
124
|
reply_to_message_id=reply_id,
|
125
125
|
photo=img
|
@@ -3,7 +3,7 @@ lib/systemd/system/warp_beacon.service,sha256=lPmHqLqcI2eIV7nwHS0qcALQrznixqJuww
|
|
3
3
|
var/warp_beacon/accounts.json,sha256=rKFQM_b9eoDS4mJ1B_SZNolPLXx1SQdQMdY2F_ZcBt8,1523
|
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=aUbdyFfi_4ESHpZeMAdC3w7P2YbNirARoYoYvf5I8tY,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
|
@@ -26,20 +26,20 @@ warp_beacon/scraper/exceptions.py,sha256=lHsPrYy5iYnHsIdUHqRxZmzlqrkNj_TS4TkiTJf
|
|
26
26
|
warp_beacon/scraper/instagram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
27
|
warp_beacon/scraper/instagram/instagram.py,sha256=iT66IM7nsbVDWQzBW-CJUWDBjoBbRZH4BHx6TJw3oqo,13517
|
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=H04KDpO5RWBvFX7BxQ3U4jeiQnkpfADHdaRtfsk13pk,6170
|
30
30
|
warp_beacon/scraper/youtube/music.py,sha256=8TguqXc1BC9Slp09BzCU8dtQ6BnyKwzZSLLFHpqDHtg,1498
|
31
31
|
warp_beacon/scraper/youtube/shorts.py,sha256=pHfvEBau8Zp7Ar3LBuPmjqYq8fmjJUQvzeZXujQMpG4,1203
|
32
32
|
warp_beacon/scraper/youtube/youtube.py,sha256=K98n2TSJaDZt-xT7mADZL1UEf2exIYm0Wnenn2GAYfI,2250
|
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=EOfqhAZN_LDgjJrJCgIKzU1F6rd1t6dHYGmspu0OWas,15387
|
36
36
|
warp_beacon/telegram/handlers.py,sha256=xSNG_v4D4FaA5q1_5wXvJkjcDUhy5GaQnfpijJZpnPk,7039
|
37
|
-
warp_beacon/telegram/placeholder_message.py,sha256=
|
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.11.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
41
|
+
warp_beacon-2.2.11.dist-info/METADATA,sha256=9E-tsvgS-txck4R0L-qXn2OAnsVIr_sCNGV6t0M93Dc,21251
|
42
|
+
warp_beacon-2.2.11.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
43
|
+
warp_beacon-2.2.11.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
|
44
|
+
warp_beacon-2.2.11.dist-info/top_level.txt,sha256=ALb_Ft_eG-OY4_m0TWUifNUOZsrx483L-zw7G7vqXoc,971
|
45
|
+
warp_beacon-2.2.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|