Downloading a Video¶
The YouTube DL Scraper allows you to scrape and download videos from multiple YouTube downloader websites. This guide demonstrates how to download a video using the scraper.
Import the YouTube Classe
To begin, import the necessary classes from the package:
Alternatively
You cam import the YouTube class in other ways
Next intilize the YouTube Object
Tip
You can select the scrapers to use:
Now lets download a video for this example we'll download: Coding levels explaind by thedevgeniusyt .
Now we have a Video Object which contains video data This makes it easy for us to get the video infomation like title, duration e.t.c
print(video.title) # (1)!
print(video.duration) # (2)!
print(video.fduration) # (3)!
print(video.thumbnail) # (4)!
- Output:
'coding levels explained:what makes a beginner, intermediate and expert programmer?'
- Output:
185
- Output:
'3.08 min'
- Output:
python 'https://i.ytimg.com/vi/dhlx4hGmgPY/sddefault.jpg'
And to download the highest quality video
- Output:
'coding-levels-explained-what-makes-a-beginner-interm... .mp4'