small problem
This commit is contained in:
levina 2021-09-13 05:49:35 +07:00 committed by GitHub
parent 3723ae6eb5
commit cc0d89325f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,11 +52,11 @@ def youtube(url: str):
params = {"format": "best[height=?480]/best", "noplaylist": True} params = {"format": "best[height=?480]/best", "noplaylist": True}
yt = YoutubeDL(params) yt = YoutubeDL(params)
info = yt.extract_info(url, download=False) info = yt.extract_info(url, download=False)
return info['url'], return info['title'], return info['duration'] return info['url'], info['title'], info['duration']
except ExtractorError: except ExtractorError:
return return None, None
except Exception: except Exception:
return return None, None
@Client.on_message(command(["vplay", f"vplay@{Veez.BOT_USERNAME}"]) & filters.group & ~filters.edited) @Client.on_message(command(["vplay", f"vplay@{Veez.BOT_USERNAME}"]) & filters.group & ~filters.edited)