So I want to download the youtube video as "song.m4a", however when I run the following code it gives "song.m4a.webm". How can I fix this?
from __future__ import unicode_literals
import youtube_dl
import os
##Function to download file from youtube
def getYoutube(url):
ydlOps = {'format': 'bestaudio/best','postprocessors': [{'key': 'FFmpegExtractAudio','preferredcodec': 'm4a','preferredquality': '192',}],'outtmpl':f"{os.getcwd()}/song.m4a"}
with youtube_dl.YoutubeDL(ydlOps) as ydl:
ydl.download([url])