Skip to content

Instantly share code, notes, and snippets.

@pnhoang
Last active April 9, 2024 12:19
Show Gist options
  • Star 29 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save pnhoang/642f3853100dea7fec13962ffd20e8bd to your computer and use it in GitHub Desktop.
Save pnhoang/642f3853100dea7fec13962ffd20e8bd to your computer and use it in GitHub Desktop.
How to download ALL videos of ANY YouTube Channel

Step 1: Download Google Chrome

https://www.google.com/chrome/

Step 2: Install Web Scraper extension

https://chrome.google.com/webstore/detail/web-scraper/jnhgnonknehpejjnehehllkliplmbmhn

More tutorials: https://www.webscraper.io/

https://www.webscraper.io/tutorials

Step 3: Find the Channel you want to download

deutsch lernen

go to channel

go to Videos tab

copy the URL

Step 4: Download the video list as CSV

Right click to Inspect

Navigate to Web Scraper tab

Create new sitemap ID: name of channel Start URL: the URL you copied above

Add new selector

Id: videos
Type: Element scroll down
Selector: .ytd-grid-renderer div#meta
Multiple: checked
Parent Selectors: _root

Click on videos selector

Add new selector

Id: link
Type: Link
Selector: a
Multiple: checked
Parent selectors: videos

Optional preview

Scrape

Export data

Step 5a: Download the dl-youtube-videos binary for each platform

Download the binary at

https://github.com/pnhoang/dl-youtube-videos/releases

Extract the binary

Open terminal window

Navigate to the downloaded folder:

$ cd ~/Downloads/dl-youtube-videos
$ bin/dl-youtube-videos {csv_file}

Voillaaa, all the videos will be downloaded into the current folder in mp4 format. Enjoy the videos and remember to subscribe to the channel you downloaded, also to my channel to receive more update.

Step 5b: Optional

Check if you have Node installed in your computer

➜ node -v
v10.16.3
➜ npx -v
6.9.0

Use the script with npx:

➜ npx dl-youtube-videos {csv_file}
@krishh999
Copy link

hi Thanks, I am unable to get content list in csv. its have empty headers . please help

@rainthree
Copy link

rainthree commented Oct 25, 2023

krishh999 you can use the free tool jdownloader2 https://jdownloader.org to download all the youtube videos from a channel or playlists

@Amrinder-S
Copy link

Does it also download comments?

@CoolPraDude
Copy link

you can use 4K downloader as well to download full youtube channel.

@apoorvai74
Copy link

HI, Thanks for your efforts. Just Now I used ur suggestions but Unfortunately got an error in last step. the Error is :
(node:12944) Unhandled promiserejectionwarning: typeerror: Expected property 'title' to be of type 'string', got undefined.

If required I can send u the CSV also. Just let me know the address.
Thanks

@Joseridgeway
Copy link

Joseridgeway commented Apr 7, 2024

I was using youtube video downloader for downloading videos in bulk but I have to select all the videos manually. But after using this scrapper method I can download all of them at once. Cheers!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment