Python 3 (Youtube-DL + Pafy) Script to Get Youtube Video Thumbnail,Views Likes, VideoID, Duration and Ratings Full Project For Beginners

Python 3 (Youtube-DL + Pafy) Script to Get Youtube Video Thumbnail,Views Likes, VideoID, Duration and Ratings Full Project For Beginners

 

Welcome folks today in this tutorial we will be getting youtube video thumbnail and views and all sort of information in python using youtube-dl and pafy library. All the source code of the application is given below.

 

 

 

Get Started

 

 

 

In order to get started we need to install the following libraries by using the pip command

 

pip install youtube-dl

 

pip install pafy

 

After installing all these libraries just make an app.py file and copy paste the following code

 

app.py

 

import pafy  
    
# url of video  
url = "https://www.youtube.com/watch?v=vG2PNdI8axo"
    
# getting video 
video = pafy.new(url)  

print(video)

  
# printing the value 
print("Likes : " + str(likes))
print("VideoId : " + str(videoid))
print("Duration : " + str(duration))
print("Author : " + str(author))
#print("Subscribers :" + str(subscribers))

 

See also  Python Tkinter GUI Script to Make a LIVE INR/USD Currency Converter Using BeautifulSoup4 and Requests Library Full Project For Beginners

 

 

 

Leave a Reply