warp-beacon 2.8.12__tar.gz → 2.8.13__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.8.12/warp_beacon.egg-info → warp_beacon-2.8.13}/PKG-INFO +1 -1
- warp_beacon-2.8.13/warp_beacon/__version__.py +2 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/telegram/bot.py +16 -3
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/telegram/edit_message.py +30 -19
- {warp_beacon-2.8.12 → warp_beacon-2.8.13/warp_beacon.egg-info}/PKG-INFO +1 -1
- warp_beacon-2.8.12/warp_beacon/__version__.py +0 -2
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/LICENSE +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/MANIFEST.in +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/README.md +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/assets/cc-group-black.png +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/assets/placeholder.gif +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/etc/.gitignore +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/etc/accounts.json +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/etc/proxies.json +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/etc/warp_beacon.conf +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/etc/warp_beacon.service +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/pyproject.toml +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/setup.cfg +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/setup.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/__init__.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/compress/__init__.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/compress/video.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/jobs/__init__.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/jobs/abstract.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/jobs/download_job.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/jobs/types.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/jobs/upload_job.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/mediainfo/__init__.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/mediainfo/abstract.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/mediainfo/audio.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/mediainfo/silencer.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/mediainfo/video.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scheduler/__init__.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scheduler/instagram_human.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scheduler/scheduler.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/X/X.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/X/__init__.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/X/abstract.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/X/types.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/__init__.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/abstract.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/account_selector.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/exceptions.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/fail_handler.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/instagram/__init__.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/instagram/captcha.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/instagram/instagram.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/instagram/wb_instagrapi.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/link_resolver.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/utils.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/youtube/__init__.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/youtube/abstract.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/youtube/music.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/youtube/shorts.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/scraper/youtube/youtube.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/storage/__init__.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/storage/mongo.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/telegram/__init__.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/telegram/caption_shortener.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/telegram/download_status.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/telegram/handlers.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/telegram/placeholder_message.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/telegram/progress_bar.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/telegram/progress_file_reader.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/telegram/types.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/telegram/utils.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/uploader/__init__.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/warp_beacon.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon/yt_auth.py +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon.egg-info/SOURCES.txt +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon.egg-info/dependency_links.txt +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon.egg-info/entry_points.txt +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon.egg-info/requires.txt +0 -0
- {warp_beacon-2.8.12 → warp_beacon-2.8.13}/warp_beacon.egg-info/top_level.txt +0 -0
@@ -11,7 +11,7 @@ from pyrogram import Client, filters
|
|
11
11
|
from pyrogram.enums import ParseMode, ChatType
|
12
12
|
from pyrogram.handlers import MessageHandler, CallbackQueryHandler
|
13
13
|
from pyrogram.types import InputMediaAudio, InputMediaPhoto, InputMediaVideo, InputMediaAnimation, InlineKeyboardButton, InlineKeyboardMarkup
|
14
|
-
from pyrogram.errors import NetworkMigrate, BadRequest, MultiMediaTooLong, MessageIdInvalid
|
14
|
+
from pyrogram.errors import NetworkMigrate, BadRequest, MultiMediaTooLong, MessageIdInvalid, FloodWait
|
15
15
|
|
16
16
|
import warp_beacon
|
17
17
|
from warp_beacon.__version__ import __version__
|
@@ -443,7 +443,13 @@ class Bot(object):
|
|
443
443
|
JobType.ANIMATION: self.client.send_animation
|
444
444
|
}
|
445
445
|
try:
|
446
|
-
|
446
|
+
while True:
|
447
|
+
try:
|
448
|
+
reply_message = await send_funcs[job.media_type](**self.build_tg_args(job))
|
449
|
+
break
|
450
|
+
except FloodWait as e:
|
451
|
+
logging.warning("FloodWait occurred, waiting '%d' seconds before retry", int(e.value))
|
452
|
+
asyncio.sleep(e.value)
|
447
453
|
except ValueError as e:
|
448
454
|
err_text = str(e)
|
449
455
|
if "Expected" in err_text:
|
@@ -464,7 +470,14 @@ class Bot(object):
|
|
464
470
|
snd_grp_options = {"chat_id": job.chat_id, "reply_to_message_id": job.message_id}
|
465
471
|
for i, media_chunk in enumerate(col_job_args["media"]):
|
466
472
|
snd_grp_options["media"] = media_chunk
|
467
|
-
messages =
|
473
|
+
messages = []
|
474
|
+
while True:
|
475
|
+
try:
|
476
|
+
messages = await self.client.send_media_group(**snd_grp_options)
|
477
|
+
break
|
478
|
+
except FloodWait as e:
|
479
|
+
logging.warning("FloodWait occurred, waiting '%d' seconds before retry", int(e.value))
|
480
|
+
asyncio.sleep(e.value)
|
468
481
|
sent_messages += messages
|
469
482
|
if job.media_collection:
|
470
483
|
for j, _ in enumerate(media_chunk):
|
@@ -1,9 +1,13 @@
|
|
1
|
+
import asyncio
|
1
2
|
import re
|
2
3
|
|
4
|
+
import logging
|
5
|
+
|
3
6
|
from pyrogram.client import Client
|
4
7
|
from pyrogram.types import InputMedia, InputMediaAudio, InputMediaPhoto, InputMediaVideo, InputMediaAnimation, InlineKeyboardMarkup
|
5
8
|
from pyrogram import raw
|
6
9
|
from pyrogram import types
|
10
|
+
from pyrogram.errors import FloodWait
|
7
11
|
|
8
12
|
from warp_beacon.telegram.progress_bar import ProgressBar
|
9
13
|
from warp_beacon.telegram.types import ReportType
|
@@ -124,23 +128,30 @@ class EditMessage(object):
|
|
124
128
|
raw_file_thumb = await self.client.save_file(path=media.thumb)
|
125
129
|
raw_media = self.get_wrapped_animation(raw_file=raw_file, raw_thumb=raw_file_thumb, media=media, file_name=file_name)
|
126
130
|
|
127
|
-
peer =
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
131
|
+
peer, r = None, None
|
132
|
+
while True:
|
133
|
+
try:
|
134
|
+
peer = await self.client.resolve_peer(chat_id)
|
135
|
+
r = await self.client.invoke(
|
136
|
+
raw.functions.messages.EditMessage(
|
137
|
+
peer=peer,
|
138
|
+
id=message_id,
|
139
|
+
media=raw_media,
|
140
|
+
reply_markup=await reply_markup.write(self.client) if reply_markup else None,
|
141
|
+
message=message,
|
142
|
+
entities=entities
|
143
|
+
)
|
144
|
+
)
|
145
|
+
break
|
146
|
+
except FloodWait as e:
|
147
|
+
logging.warning("FloodWait occurred, waiting '%d' seconds before retry", int(e.value))
|
148
|
+
asyncio.sleep(e.value)
|
139
149
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
150
|
+
if r:
|
151
|
+
for i in r.updates:
|
152
|
+
if isinstance(i, (raw.types.UpdateEditMessage, raw.types.UpdateEditChannelMessage)):
|
153
|
+
return await types.Message._parse(
|
154
|
+
self.client, i.message,
|
155
|
+
{i.id: i for i in r.users},
|
156
|
+
{i.id: i for i in r.chats}
|
157
|
+
)
|
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
|
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
|