Back up a YouTube channel with JDownloader2

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.

Tiia Monto, CC BY-SA 3.0, via Wikimedia Commons

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:

  1. 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
  2. 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
  3. Pare down the spreadsheet to just the video URLs
  4. After adjusting a few settings in JDownloader, copy the URLs into the JDownloader LinkGrabber panel
  5. 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

  1. If needed, download and install JDownloader 2
  2. In Settings, select a download folder on a device with adequate space. The default is your Downloads folder
  3. To disable downloading of audio files (the video will still have its soundtrack) click on the Settings tab  1️⃣ in JDownloader2
  4. Select Plugins 2️⃣ in the left column
  5. Use the drop-down menu to select youtube.com in the plug-in chooser 3️⃣


  6. Scroll down the Settings page until the list of file types is visible
  7. Scroll down the list of file types to the list of audio formats and deselect all of them
  8. The rest of the settings can remain the same

Capturing URLs (the following instructions were taken from this YouTube video)

  1. Open Chrome, Firefox, or Safari and go to your channel
  2. Select the Videos tab on your channel page
  3. Right-click anywhere on the page and choose Inspector in the context menu


  4. The Inspector panel will appear either on the bottom or the side of the browser window
  5. Locate and click on the Console tab
  6. Copy and paste the following command into the Console window:

    var scroll = setInterval(function(){ window.scrollBy(0, 1000)}, 1000);
  7. Wait for the page to reload. This may take a while if the channel is large
  8. 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')}});
  9. This will clear the Console window and load a tab-delimited list of all the videos in the Channel
  10. Click on any element in the list and then Select All via menu or keyboard


  11. Open a new spreadsheet, select the first cell and Paste what you’ve copied
  12. 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

  1. Launch JDownloader2 if it’s not already open
  2. Click the LinkGrabber tab
  3. Open the text file you created in Step 12 above and Copy its contents
  4. 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)
  5. JDownloader will begin checking the links entered and the following window will appear:


  6. When the check is complete, Click the All Downloads button on the bottom right of the screen

  7. 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:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.