fix ytdl sources sometimes not having a "bestaudio" format

This commit is contained in:
Tomáš Mládek 2019-05-01 10:51:16 +02:00 committed by Tomáš Mládek
parent c17b3df3f5
commit 4bbe6475b0

View file

@ -78,7 +78,7 @@ class DelojzaBot:
'outtmpl': os.path.join(self.tmp_dir, '{}__%(title)s__%(id)s.%(ext)s'.format(datestr(date)))
}
if extract:
ydl_opts['format'] = 'bestaudio'
ydl_opts['format'] = 'bestaudio/best'
ydl_opts['postprocessors'] = [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',