Support full 2GB/2h video downloads via Local Bot API, clean VK wiki links and remove fallback links

This commit is contained in:
2026-08-14 19:46:16 +05:00
parent 3ded8d3edd
commit 144dd3cb52
5 changed files with 47 additions and 33 deletions
+1 -9
View File
@@ -371,16 +371,8 @@ class TelegramPoster:
3. Tries sendRichMessage first.
4. If unavailable, falls back to legacy media groups / single media / text.
"""
# Append link-only media notice if any videos/photos couldn't be downloaded
link_only = [m for m in media_items if m.is_link_only]
link_text = ""
if link_only:
lines = [f"- {m.media_type}: <a href=\"{m.original_url}\">ссылка</a>" for m in link_only]
link_text = "\n\n<i>Медиа по ссылке:</i>\n" + "\n".join(lines)
full_raw = (raw_text + link_text).strip()
formatted_text = format_post_text(
full_raw,
raw_text,
parse_mode="html",
bold_first_line=settings.format_first_line_bold,
vk_url=vk_url,