Overview
Did you know if that if YouTube deletes your channel, even if they do it in error and it’s “restored,” the content is gone forever–unless you have a backup? I found that using Google Takeout can be really cumbersome with large channels and the collection of files and data it gives you aren’t in a form that is very helpful for restoring things. After searching around (like, a lot), I found a great video on YouTube from GSheets with a whole different approach.
This tutorial may gloss over some of the Google Sheets aspects he specializes in, so check out his video for that. But I’ll go a lot deeper into how to use JDownloader2 in the process. This is something I originally wrote as part of my job at Portland Community College, but I thought it’s worth making available to the world at large.
This is the basic process:
- Use one JavaScript command line in a brower’s Inspector console to force a YouTube Channel to display all the videos for that channel on one page
- Use a second JS command to create a tab-delimited list of video titles and URLs in the Console window that can be pasted into a spreadsheet
- Pare down the spreadsheet to just the video URLs
- After adjusting a few settings in JDownloader, copy the URLs into the JDownloader LinkGrabber panel
- When the links are loaded and confirmed, begin the downloads
For each video on the channel, JDownloader will create a folder containing the following (the folder and each file will have a filename based on the video’s YouTube title):
- The video as an mp4 in the highest-quality available (if the video was uploaded as 1080p, the mp4 will be 1080p)
- All .srt caption files
- The text description from YouTube
- The JPEG thumbnail image used by YouTube
- There is an option to download an audio-only version of the video, but because these are nearly as large as the videos. This will be turned off when you adjust the Jdownloader settings
Step-by-step instructions
Preparing Jdownloader2
- If needed, download and install JDownloader 2
- In Settings, select a download folder on a device with adequate space. The default is your Downloads folder
- To disable downloading of audio files (the video will still have its soundtrack) click on the Settings tab 1️⃣ in JDownloader2
- Select Plugins 2️⃣ in the left column
- Use the drop-down menu to select youtube.com in the plug-in chooser 3️⃣
- Scroll down the Settings page until the list of file types is visible
- Scroll down the list of file types to the list of audio formats and deselect all of them
- The rest of the settings can remain the same
Capturing URLs (the following instructions were taken from this YouTube video)
- Open Chrome, Firefox, or Safari and go to your channel
- Select the Videos tab on your channel page
- Right-click anywhere on the page and choose Inspector in the context menu
- The Inspector panel will appear either on the bottom or the side of the browser window
- Locate and click on the Console tab
- Copy and paste the following command into the Console window:
var scroll = setInterval(function(){ window.scrollBy(0, 1000)}, 1000);
- Wait for the page to reload. This may take a while if the channel is large
- When it has reloaded, copy and paste the following command into the Console window:
window.clearInterval(scroll); console.clear(); urls = $$('a'); urls.forEach(function(v,i,a){if (v.id=="video-title"){console.log('\t'+v.title+'\t'+v.href+'\t')}});
- This will clear the Console window and load a tab-delimited list of all the videos in the Channel
- Click on any element in the list and then Select All via menu or keyboard
- Open a new spreadsheet, select the first cell and Paste what you’ve copied
- From the resulting spreadsheet, extract the URLs only into a separate text file (you may find it useful to preserve the sheet as a catalog of the videos downloaded)
The JDownloader download
- Launch JDownloader2 if it’s not already open
- Click the LinkGrabber tab
- Open the text file you created in Step 12 above and Copy its contents
- Right click in the LinkGrabber window and Paste the links via a right-click (you should do this rather promptly or else JDownloader will start parsing your clipboard for links automatically)
- JDownloader will begin checking the links entered and the following window will appear:
- When the check is complete, Click the All Downloads button on the bottom right of the screen
- The Downloads window will open and you’ll be able to monitor your progress
Notes
- For incremental backups, you can omit the first Console command as long as all the new videos appear on the Channel page when it opens. If the number of videos isn’t large, simply pasting their links into JDownloader from YouTube should be all that’s needed
- Even if your download URL list contains videos that have already been downloaded, JDownloader may “remember” this and ask you if you want them redownloaded
- If JDownloader finds files that have already been downloaded, you’ll see the following warning:
You can set a default behavior for this situation in the Settings/General panel: