How to download YouTube content and metadata using python - By Jitender Thakur

Pafy is a Python library used to download YouTube content and retrieve metadata such as view count, duration, rating, author, thumbnail or downloading video or audio at requested resolution.


We need to install pafy and additional you tube_dl library to get access to YouTube.

Firstly we use the following commands to get access to your you tube account and with the help of URL we can get access to you tube video and all stream function can be used to get the video quality of the video in a single list among which we can select the desired resolution.

The following command is used to get the best resolution.

Manging Youtube account

Following are the commands used to manage your youtube account:

1. To get the Title of the video

2. To get the rating of the video out of 5

3. To check the views of a YouTube video

4. To check the length of the video

5. To check the like and dislike of the video

Using pafy to download the best audio quality

13 views0 comments

Contact Us:

A-116, The Corenthum A-65,

Sector 62

Noida 201301

UP, India

Phone: +91 8882050481


© 2020 TheIkigaiLab  Terms of Use Privacy and Security Statement