YoutubeDL 开始下载整个播放列表而不是一个视频

YoutubeDL starts Downloading the Whole playlist instead of just one Video

我正在尝试使用 Youtubedl 从 Youtube 下载视频。我很容易地下载了该播放列表的一个视频,但是在我尝试从其 URL 下载第二个视频时,YoutubeDL 开始下载整个播放列表。我是一个菜鸟,所以任何帮助都会很棒:) url link 是:https://www.youtube.com/watch?v=wtdFPppcup4&list=PL9ooVrP1hQOH3SvcgkC4Qv2cyCebvs0Ik&index=3&t=0s

可能是 URL 的问题?

如果你看看你的 URL https://www.youtube.com/watch?v=wtdFPppcup4&list=PL9ooVrP1hQOH3SvcgkC4Qv2cyCebvs0Ik&index=3&t=0s , you'll see it refers both to a video https://www.youtube.com/watch?v=wtdFPppcup4 and a playlist ( https://www.youtube.com/playlist?list=PL9ooVrP1hQOH3SvcgkC4Qv2cyCebvs0Ik ).

youtube-dl 默认将此解释为播放列表,但您可以强制执行这两种行为之一。在 youtube-dl's options 中,您会发现

--no-playlist Download only the video, if the URL refers a video and a playlist.
--yes-playlist Download the playlist, if the URL refers to video and a playlist.

所以启动 youtube-dl 为

youtube-dl --no-playlist "https://www.youtube.com/watch?v=wtdFPppcup4&list=PL9ooVrP1hQOH3SvcgkC4Qv2cyCebvs0Ik&index=3&t=0s"

只获取视频。如果您总是想要这种行为,请考虑 setting up a configuration file.