From 95deed1b9bf85f388b585e6a6819f5a64ffef475 Mon Sep 17 00:00:00 2001 From: Omidu Sithul <97288848+OmiduSithul@users.noreply.github.com> Date: Tue, 29 Nov 2022 18:27:31 +0530 Subject: [PATCH] Minor fix (#48) Fix yt-dlp link --- bot/modules/ytdlp.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot/modules/ytdlp.py b/bot/modules/ytdlp.py index 9da3209205..8405cf909c 100644 --- a/bot/modules/ytdlp.py +++ b/bot/modules/ytdlp.py @@ -102,6 +102,9 @@ def _ytdl(bot, message, isZip=False, isLeech=False): link = args[index].strip() if link.startswith(("|", "pswd:", "opt:")): link = '' + else: + link = re_split(r"opt:|pswd:|\|", link)[0] + link = link.strip() name = mssg.split('|', maxsplit=1) if len(name) > 1: @@ -379,4 +382,4 @@ def ytdlZipleech(update, context): dispatcher.add_handler(ytdl_zip_handler) dispatcher.add_handler(ytdl_leech_handler) dispatcher.add_handler(ytdl_zip_leech_handler) -dispatcher.add_handler(quality_handler) \ No newline at end of file +dispatcher.add_handler(quality_handler)