youtube-dl ist eine Open-Source-Software, die Videos von jeder Video-Site einschließlich YouTube, Niconico und BiliBili herunterladen kann, aber es gibt viele Fälle, in denen Videos oder Seiten nicht funktionieren und Fehler auftreten. yt-dlp ist ein Fork und eine Abzweigung von youtube-dl, veröffentlicht als verbesserte Version von youtube-dl. Dieser Artikel stellt das Herunterladen, Installieren und Verwenden von yt-dlp vor.
Github:
yt-dlp/yt-dlp: A youtube-dl fork with additional features and fixes
Installieren Sie yt-dlp.
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp
Das Folgende zeigt ein Beispiel für das Herunterladen eines Niconico-Videos. (Die Video-URL ist ein nicht existierendes Beispiel)
$ yt-dlp "https://www.nicovideo.jp/watch/sm123123123"
[niconico] sm123123123: Downloading webpage
[niconico] sm123123123: Downloading video info page
[info] sm123123123: Downloading 1 format(s): h264_480p-aac_192kbps
Wenn Sie versuchen, das Obige mit youtube-dl herunterzuladen, erhalten Sie einen Fehler.
$ youtube-dl "https://www.nicovideo.jp/watch/sm123123123"
[niconico] sm123123123: Downloading webpage
[niconico] sm123123123: Downloading flv info
ERROR: Unable to find video URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure
to call youtube-dl with the --verbose flag and include its complete output.