I'm coding program that download mp3 audio from youtube videos but I have an issue that yt-dl show some output in console
my code:
with open('Links.txt') as f:
content = f.readlines()
for links in content:
ydl_opts = {
'format': 'bestaudio/best',
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download([links])
and i need the option or some way to hide the output.
Try adding "quiet": true, to your ydl_opts
If that doesn't work maybe add
"external_downloader_args": ['-loglevel', 'panic']