diff --git a/youtubedownloader/youtubedownloader.py b/youtubedownloader/youtubedownloader.py index 2fcde08..d11a626 100644 --- a/youtubedownloader/youtubedownloader.py +++ b/youtubedownloader/youtubedownloader.py @@ -67,11 +67,11 @@ class YouTubeDownloader(commands.Cog): yt = YouTube(url=url) filename = f"{yt.title} ({yt.video_id})" if audio_only: - yt.streams.filter(progressive=True, only_audio=True, format='m4a') + yt.streams.filter(progressive=True, only_audio=True, file_extension='m4a') yt.streams.order_by('abr') filename_format = filename + ".m4a" else: - yt.streams.filter(progressive=True, format="mp4") + yt.streams.filter(progressive=True, file_extension="mp4") yt.streams.order_by('resolution') filename_format = filename + ".mp4" if os.path.isfile(path + f"{os.sep}{filename_format}"):