warp-beacon 2.3.23__tar.gz → 2.3.25__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.23/warp_beacon.egg-info → warp_beacon-2.3.25}/PKG-INFO +1 -1
- warp_beacon-2.3.25/warp_beacon/__version__.py +2 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/jobs/abstract.py +2 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/telegram/bot.py +4 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/telegram/handlers.py +22 -18
- {warp_beacon-2.3.23 → warp_beacon-2.3.25/warp_beacon.egg-info}/PKG-INFO +1 -1
- warp_beacon-2.3.23/warp_beacon/__version__.py +0 -2
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/LICENSE +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/MANIFEST.in +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/README.md +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/assets/placeholder.gif +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/etc/.gitignore +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/etc/accounts.json +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/etc/proxies.json +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/etc/warp_beacon.conf +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/etc/warp_beacon.service +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/pyproject.toml +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/setup.cfg +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/setup.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/__init__.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/compress/__init__.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/compress/video.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/jobs/__init__.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/jobs/download_job.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/jobs/types.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/jobs/upload_job.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/mediainfo/__init__.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/mediainfo/abstract.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/mediainfo/audio.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/mediainfo/silencer.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/mediainfo/video.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scheduler/__init__.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scheduler/scheduler.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scraper/__init__.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scraper/abstract.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scraper/account_selector.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scraper/exceptions.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scraper/fail_handler.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scraper/instagram/__init__.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scraper/instagram/instagram.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scraper/link_resolver.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scraper/youtube/__init__.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scraper/youtube/abstract.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scraper/youtube/music.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scraper/youtube/shorts.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/scraper/youtube/youtube.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/storage/__init__.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/storage/mongo.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/telegram/__init__.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/telegram/caption_shortener.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/telegram/placeholder_message.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/telegram/utils.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/uploader/__init__.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon/warp_beacon.py +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon.egg-info/SOURCES.txt +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon.egg-info/dependency_links.txt +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon.egg-info/entry_points.txt +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon.egg-info/requires.txt +0 -0
- {warp_beacon-2.3.23 → warp_beacon-2.3.25}/warp_beacon.egg-info/top_level.txt +0 -0
@@ -13,6 +13,7 @@ class JobSettings(TypedDict):
|
|
13
13
|
job_id: uuid.UUID
|
14
14
|
message_id: int
|
15
15
|
chat_id: int
|
16
|
+
user_id: int
|
16
17
|
placeholder_message_id: int
|
17
18
|
local_media_path: str
|
18
19
|
local_compressed_media_path: str
|
@@ -49,6 +50,7 @@ class JobSettings(TypedDict):
|
|
49
50
|
class AbstractJob(ABC):
|
50
51
|
job_id: uuid.UUID = None
|
51
52
|
message_id: int = 0
|
53
|
+
user_id: int = 0
|
52
54
|
chat_id: int = 0
|
53
55
|
placeholder_message_id: int = 0
|
54
56
|
local_media_path: str = ""
|
@@ -417,6 +417,10 @@ class Bot(object):
|
|
417
417
|
elif msg.photo:
|
418
418
|
tg_file_ids.append(msg.photo.file_id + ':image')
|
419
419
|
logging.info("Uploaded to Telegram")
|
420
|
+
#TODO send message with caption if request from private chat
|
421
|
+
#if job.chat_type not in (ChatType.GROUP, ChatType.SUPERGROUP):
|
422
|
+
# if job.canonical_name:
|
423
|
+
# self.client.send_message()
|
420
424
|
break
|
421
425
|
except MultiMediaTooLong as e:
|
422
426
|
logging.error("Failed to upload due telegram limitations :(")
|
@@ -243,29 +243,33 @@ class Handlers(object):
|
|
243
243
|
first_entity = {}
|
244
244
|
if db_results:
|
245
245
|
first_entity = db_results[0]
|
246
|
+
|
247
|
+
text = first_entity.get("canonical_name", "Failed to fetch data.")
|
246
248
|
|
247
249
|
try:
|
248
|
-
|
249
|
-
|
250
|
-
text
|
251
|
-
|
252
|
-
callback_query_id=query.id,
|
253
|
-
show_alert=True,
|
254
|
-
text=text
|
250
|
+
await client.send_message(
|
251
|
+
query.from_user.id,
|
252
|
+
text,
|
253
|
+
parse_mode=ParseMode.HTML
|
255
254
|
)
|
256
|
-
except Exception as
|
257
|
-
logging.warning("read_more_handler: Failed for uniq_id='%s', origin='%s'", uniq_id, origin)
|
258
|
-
logging.exception(e)
|
259
|
-
|
255
|
+
except Exception as _:
|
260
256
|
try:
|
261
|
-
error_text = str(e)
|
262
|
-
if len(error_text) > 200:
|
263
|
-
error_text = error_text[:197] + "..."
|
264
|
-
|
265
257
|
await client.answer_callback_query(
|
266
258
|
callback_query_id=query.id,
|
267
259
|
show_alert=True,
|
268
|
-
text=
|
260
|
+
text="You haven’t messaged the bot yet. Please start the chat using the /start bot command."
|
269
261
|
)
|
270
|
-
except Exception as
|
271
|
-
|
262
|
+
except Exception as e:
|
263
|
+
logging.warning("Failed to return error to user about TG restrictions!")
|
264
|
+
logging.exception(e)
|
265
|
+
return
|
266
|
+
|
267
|
+
try:
|
268
|
+
await client.answer_callback_query(
|
269
|
+
callback_query_id=query.id,
|
270
|
+
show_alert=True,
|
271
|
+
text="Check your private chat — I've sent you the message!"
|
272
|
+
)
|
273
|
+
except Exception as e:
|
274
|
+
logging.error("Failed to report sent message status!")
|
275
|
+
logging.exception(e)
|
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
|