PYTHON PROGRAMMING

Download Many Youtube Videos Using Python and youtube-dl

It’s so easy that it will blow your mind!

Marcin Kozak
PythonIQ
Published in
11 min readJan 2, 2023

--

Image by author.

You don’t need a premium account to download videos from Youtube. What you need is Python and the youtube-dl command-line program:

In this article, I’m not going to show how to use it to download a Youtube video, but how to create a Python script that uses youtube-dl to download multiple Youtube videos in an automatic way. By an automatic way I mean calling this script, and it downloads multiple videos.

I will split this article into two parts:

  • youtube-dl: a part related to downloading Youtube videos; the youtube-dl app works also for some other platforms, but today we’re interested in Youtube only
  • automating youtube-dl in order to run it for many videos in one call

The second part will be more interesting to Python users, as it will deal with the essence of our today’s topic. It’s divided into two parts. The first one shows and…

--

--

Marcin Kozak
PythonIQ

A full professor, interdisciplinary researcher, data scientist, statistician, Python, R and Go developer, open-source contributor — and a devoted writer