Skip to content

Commit

Permalink
youtube: fix ytdl command
Browse files Browse the repository at this point in the history
  • Loading branch information
alissonlauffer committed Sep 30, 2023
1 parent 2bc5e35 commit fc0f222
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eduu/plugins/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ async def ytdlcmd(c: Client, m: Message, strings):
yt = yt["entries"][0]

for f in yt["formats"]:
if f["format_id"] == "140":
if f["format_id"] == "140" and f.get("filesize") is not None:
afsize = f["filesize"] or 0
if f["ext"] == "mp4" and f["filesize"] is not None:
if f["ext"] == "mp4" and f.get("filesize") is not None:
vfsize = f["filesize"] or 0

keyboard = [
Expand Down

0 comments on commit fc0f222

Please sign in to comment.