Last active
May 3, 2022 21:42
-
-
Save transkatgirl/b3ba44cbb89c491a7e1d54d8c8b09b98 to your computer and use it in GitHub Desktop.
Export YouTube subscriptions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How to use this: | |
// 1. Go to https://www.youtube.com/feed/channels | |
// 2. Scroll down to the bottom to load in complete channel list | |
// 3. Open the browser console and paste this snippet: | |
let channels = $$("#main-link.channel-link"); | |
let channel_text = ""; | |
for (let i = 0; i < channels.length; i += 1) { | |
if (channels[i].href != undefined) { | |
channel_text += channels[i].parentElement.parentElement.parentElement.getElementsByTagName("yt-formatted-string")[1].innerText + " - " + channels[i].href + "\n"; | |
} | |
} | |
console.log(channel_text); | |
// 4. Copy the output to your clipboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment