LoginSignup
1
1

More than 3 years have passed since last update.

YouTubeをSaaSを使わずにCLIでダウンロード with Docker

Posted at

YouTubeのダウンロード方法として、ブラウザからダウンロードできるサイトは毎回見つけては閉鎖されてたりしますよね

pytube/pytubeはstart数が多く継続的に使えると思います。
GitHub stars

今回はDockerfileを書かずに、pytubeを使います

pytube imageの作成

docker run --name tmp-python python:latest bash -c "python -m pip install pytube"
docker commit tmp-python python-with-pytube

ダウンロード

引数などはpytube/pytubeのREADMEを見ましょ!!
カレントディレクトリに動画がダウンロードされてるはずです

docker run --rm -it -w /root -v $(pwd):/root python-with-pytube bash -c "pytube https://www.youtube.com/watch?v=2lAe1cqCOXo --itag=22"
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1