warp-beacon 2.3.22__tar.gz → 2.3.24__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.22/warp_beacon.egg-info → warp_beacon-2.3.24}/PKG-INFO +1 -1
- warp_beacon-2.3.24/warp_beacon/__version__.py +2 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/telegram/bot.py +1 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/telegram/handlers.py +19 -3
- {warp_beacon-2.3.22 → warp_beacon-2.3.24/warp_beacon.egg-info}/PKG-INFO +1 -1
- warp_beacon-2.3.22/warp_beacon/__version__.py +0 -2
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/LICENSE +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/MANIFEST.in +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/README.md +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/assets/placeholder.gif +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/etc/.gitignore +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/etc/accounts.json +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/etc/proxies.json +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/etc/warp_beacon.conf +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/etc/warp_beacon.service +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/pyproject.toml +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/setup.cfg +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/setup.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/__init__.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/compress/__init__.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/compress/video.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/jobs/__init__.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/jobs/abstract.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/jobs/download_job.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/jobs/types.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/jobs/upload_job.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/mediainfo/__init__.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/mediainfo/abstract.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/mediainfo/audio.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/mediainfo/silencer.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/mediainfo/video.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scheduler/__init__.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scheduler/scheduler.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scraper/__init__.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scraper/abstract.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scraper/account_selector.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scraper/exceptions.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scraper/fail_handler.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scraper/instagram/__init__.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scraper/instagram/instagram.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scraper/link_resolver.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scraper/youtube/__init__.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scraper/youtube/abstract.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scraper/youtube/music.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scraper/youtube/shorts.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/scraper/youtube/youtube.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/storage/__init__.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/storage/mongo.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/telegram/__init__.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/telegram/caption_shortener.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/telegram/placeholder_message.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/telegram/utils.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/uploader/__init__.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon/warp_beacon.py +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon.egg-info/SOURCES.txt +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon.egg-info/dependency_links.txt +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon.egg-info/entry_points.txt +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon.egg-info/requires.txt +0 -0
- {warp_beacon-2.3.22 → warp_beacon-2.3.24}/warp_beacon.egg-info/top_level.txt +0 -0
@@ -91,6 +91,7 @@ class Bot(object):
|
|
91
91
|
self.client.add_handler(MessageHandler(self.handlers.help, filters.command("help")))
|
92
92
|
self.client.add_handler(MessageHandler(self.handlers.random, filters.command("random")))
|
93
93
|
self.client.add_handler(MessageHandler(self.handlers.handler))
|
94
|
+
#TODO refactor to callback router
|
94
95
|
self.client.add_handler(CallbackQueryHandler(self.handlers.simple_button_handler, filters=filters.create(lambda _, __, q: not q.data.startswith("read_more:"))))
|
95
96
|
self.client.add_handler(CallbackQueryHandler(self.handlers.read_more_handler, filters=filters.create(lambda _, __, q: q.data.startswith("read_more:"))))
|
96
97
|
|
@@ -245,11 +245,27 @@ class Handlers(object):
|
|
245
245
|
first_entity = db_results[0]
|
246
246
|
|
247
247
|
try:
|
248
|
+
text = first_entity.get("canonical_name", "Failed to fetch data.")
|
249
|
+
if len(text) > 200:
|
250
|
+
text = text[:133] + "... \n\nText exceeds Telegram's limits. Use 'source link' in message."
|
248
251
|
await client.answer_callback_query(
|
249
252
|
callback_query_id=query.id,
|
250
253
|
show_alert=True,
|
251
|
-
text=
|
254
|
+
text=text
|
252
255
|
)
|
253
256
|
except Exception as e:
|
254
|
-
logging.warning("read_more_handler: Failed for uniq_id='%s', origin='%s", uniq_id, origin)
|
255
|
-
logging.exception(e)
|
257
|
+
logging.warning("read_more_handler: Failed for uniq_id='%s', origin='%s'", uniq_id, origin)
|
258
|
+
logging.exception(e)
|
259
|
+
|
260
|
+
try:
|
261
|
+
error_text = str(e)
|
262
|
+
if len(error_text) > 200:
|
263
|
+
error_text = error_text[:197] + "..."
|
264
|
+
|
265
|
+
await client.answer_callback_query(
|
266
|
+
callback_query_id=query.id,
|
267
|
+
show_alert=True,
|
268
|
+
text=error_text
|
269
|
+
)
|
270
|
+
except Exception as _:
|
271
|
+
pass
|
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
|