将参数传递给 youtube-dl
问题描述:
我想通过 --ignore-errors
(link) 参数到我的 youtube-dl 对象,我似乎做对了.代码如下:
I want to pass the --ignore-errors
(link) parameter to my youtube-dl object and i can't seem to be doing it right.
Here's the code:
options = {
'format': 'bestaudio/best',
'ignore-errors': True,
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}],
}
with youtube_dl.YoutubeDL(options) as youtube_object:
meta = youtube_object.extract_info(link, download = False)
我正在尝试下载的播放列表中的一个视频给了我一个错误,我想忽略该视频(正是 cmd --ignore-error 的作用)但是我如何将其集成到脚本中?
One of the videos from the playlist i'm trying to download gives me an error and i should like to ignore that video(exactly what the cmd --ignore-error does) but how can i integrate it in a script?