diff --git a/universal.py b/universal.py
index 580cd23..fca9a49 100644
--- a/universal.py
+++ b/universal.py
@@ -52,7 +52,8 @@ class SocialDownloaderMod(loader.Module):
video_path, info = await self.download_video(args, source)
if not video_path:
- await status.edit("❌ Не удалось скачать видео")
+ err_msg = info if isinstance(info, str) else "Неизвестная ошибка"
+ await status.edit(f"❌ Не удалось скачать видео:\n{utils.escape_html(err_msg)}")
return
caption = f"📹 Видео с {source}\n\n"
@@ -121,7 +122,7 @@ class SocialDownloaderMod(loader.Module):
stdout, stderr = await process.communicate()
if process.returncode != 0:
- return None, {}
+ return None, stderr.decode('utf-8', errors='ignore')
for file in os.listdir(temp_dir):
file_path = os.path.join(temp_dir, file)
@@ -132,11 +133,11 @@ class SocialDownloaderMod(loader.Module):
info = await self.get_video_info(url)
return final_path, info
- return None, {}
+ return None, "Файл не найден после скачивания"
except Exception as e:
print(f"Download error: {e}")
- return None, {}
+ return None, str(e)
async def get_video_info(self, url):
try:
@@ -209,7 +210,8 @@ class SocialDownloaderMod(loader.Module):
stdout, stderr = await process.communicate()
if process.returncode != 0:
- await utils.answer(message, "❌ Ошибка скачивания")
+ err_msg = stderr.decode('utf-8', errors='ignore')
+ await utils.answer(message, f"❌ Ошибка скачивания:\n{utils.escape_html(err_msg)}")
return
for file in os.listdir(temp_dir):