Skip to content

Instantly share code, notes, and snippets.

@tacohitbox
Last active February 12, 2022 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tacohitbox/fa7a9e20c31ca2d9e7031385c9ce2e9e to your computer and use it in GitHub Desktop.
Save tacohitbox/fa7a9e20c31ca2d9e7031385c9ce2e9e to your computer and use it in GitHub Desktop.
How to Bulk Replace Description Text on YouTube for free

Disclaimer: This guide is working as of 1AM EST on February 2nd, 2022. This could break at any given time. If you alert me it's not working, it will not be a guarantee of a fix. You should still comment when it doesn't work just in case I actually will fix it or to alert other users that it's broken. I wrote this really simple script to get around a paywall one time.

  1. Download TubeBuddy on your flavor of browser.
  2. Navigate to the "Content" page of YouTube Studio.

The content tab of a YouTube studio account

  1. Make sure "Bulk & Misc Tools" is right here, shown in the picture.

A photo of a circle around a "Bulk & Misc Tools" button, next to other YouTube Buttons

  1. Open the DevTools of your browser. You can do this with the keyboard shortcut (Ctrl/Cmd + Shift + C) or Right-click > Inspect Element.

The right-click > Inspect Option

  1. Navigate to the "Console" tab of DevTools.
  2. Paste the code into the text box below. Do not hit Enter yet.
//  apologies in advance to those who actually code for reading this. i wrote this on 4 hours of sleep.
var findText = "";
var replaceText = "";

function balls() { 
  document.querySelector(".tb-video-list-dropdown-find-and-replace").click()
  if (!document.querySelector("#tb-findandreplace-find")) {setTimeout(function() {balls()}, 500); return;}
  document.querySelector("#tb-findandreplace-find").value = findText;
  document.querySelector("#tb-findandreplace-replace").value = replaceText;  
  document.querySelector("#tb-findandreplace-continue").click();
  setTimeout(function() {
  document.querySelector("#tb-findandreplace-continue").click();
  var a = setInterval(function() {
    if (document.querySelector("#tb-findandreplace-loading-videos").style.display == "none") {
        var h = document.querySelectorAll(".tb-findandreplace-found-status--found").length;
        if (h == 0) return;
        clearInterval(a);
        document.querySelectorAll(".tb-findandreplace-destination-row .tb-findandreplace-checkbox-include")[0].checked = true;
        document.querySelector("#tb-findandreplace-continue").click();
        document.querySelector("#tb-findandreplace-confirm-checkbox").click();
        document.querySelector("#tb-findandreplace-kickoff").click();
        var b = setInterval(function() {
          if (document.querySelector("#tb-findandreplace-status-count").innerHTML = "<b>1</b> of <b>1</b> videos complete") {
            clearInterval(b);
            document.querySelector("#tb-findandreplace-done-close").click();
            if (h == 1) {return} else {balls()} 
          }
       }, 50)
     }
    }, 50)
  }, 50)
}

balls();
  1. Locate this part of the code.
var findText = "";
var replaceText = "";

In the quotes next to findText, put the text you want to find to replace. In the quotes next to replaceText, put the text you want to replace the found text with.

  1. Press Enter. If it has an error the first time, hit the Up arrow and hit Enter.

The process may take a long time as it goes through each video with the found content until it finds no more.

You can tell once it's finished when my shitty code makes this pop up.

image

After this is complete, check the descriptions of the effected videos. Everything should be replaced!

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