Nic
Nic

Reputation: 37

Scrape YouTube Videos with Python and Selenium

I want to Scrape all Videos from 'TVFilthyFrank' for a friend. I have all links to every video of him. I want to measure the size in MB for all videos now and download them. I know I can just say driver.get(VIDEO_URL) and then just get the src out of the player but that would take very long and wouldt look nice. Is there anyway to get the video src (or at least some information to the vid) out of the video link ?

Upvotes: 1

Views: 2484

Answers (1)

You should try youtube-dl: https://github.com/ytdl-org/youtube-dl. It can be used in python code as modude and in shell.

To download all videos from channel TVFilthyFrank you can use youtube-dl -f bestvideo+bestaudio --write-info-json https://www.youtube.com/user/TVFilthyFrank (-f bestvideo+bestaudio means the best quality). --write-info-json means save metadata to json file.

Upvotes: 1

Related Questions