Fuck yourself, RIAA.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.1 KiB

Using the youtube_dl module

When using the youtube_dl module, you start by creating an instance of YoutubeDL and adding all the available extractors:

Extracting video information

You use the YoutubeDL.extract_info method for getting the video information, which returns a dictionary:

If you want to download or play the video you can get its url:

Extracting playlist information

The playlist information is extracted in a similar way, but the dictionary is a bit different:

You can access the videos in the playlist with the entries field: