Hello i had this problem wher i run this code.
import pafy
import youtube_dl
DOWNLOAD_FOLDER = 'C:\Muziek'
url = 'https://www.youtube.com/watch?v=NyJRyif6_kk'
video = pafy.new(url)
audiostreams = video.audiostreams
for i in audiostreams:
print ('bitrate: %s, ext: %s, size: %0.2fMb' % (i.bitrate, i.extension, i.get_filesize()/1024/1024))
bestaudio = video.getbestaudio()
bestaudio.download(filepath = DOWNLOAD_FOLDER)
print('download was a succes')
when i run it it becomes a .m4a file but i want .mp3 can someone help me please?