Skip to content

Instantly share code, notes, and snippets.

@MichaelLeeHobbs
Created February 29, 2020 20:12
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 MichaelLeeHobbs/71f8799e625df672ac1ef6ec1dc2e5c4 to your computer and use it in GitHub Desktop.
Save MichaelLeeHobbs/71f8799e625df672ac1ef6ec1dc2e5c4 to your computer and use it in GitHub Desktop.
Youtube Unsubscribe from all channels
// go to the url https://www.youtube.com/feed/channels
//window.location = 'https://www.youtube.com/feed/channels'
// hit f12 and paste the below into the dev console then wait
function unsubscribeAll(channels) {
channels = channels || document.getElementById("grid-container").getElementsByClassName("ytd-expanded-shelf-contents-renderer")
channels[0].querySelector("[aria-label^='Unsubscribe from']").click()
setTimeout(()=> {
document.getElementById("confirm-button").click()
channels[0].parentNode.removeChild(channels[0])
setTimeout(()=>{
channels = document.getElementById("grid-container").getElementsByClassName("ytd-expanded-shelf-contents-renderer")
if (channels.length > 0) return unsubscribeAll(channels)
},2000)
}, 2000)
}
unsubscribeAll()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment