It's a pain in the butt! there's no google-provided way to do it and the extensions that were written to do it are all terrible or non-functional. Luckily, youtube runs on "computers" and "computers" can be "hackarino'd" with just a bit of encouragement. Prereqs are a) ability to follow instructions b) maybe some familiarity with bash. I'm writing this from my mac, it'll be the sameish on linux and WSL.
This is for non-"brand" accounts, cause i'm not a brand. I'm a small business man, not a small business, man. I'm not a man either but whatever.
This at least is easy.
- open youtube.com > profile icon > your data in youtube, should take you to myaccount.
- note the number of subscriptions, that'll be useful later
- click "Download YouTube data" (takes you to google takeout - you could start at this step but why not teach a dog to fish)
- click "All YouTube data included", because we want to change that > Deselect all but subscriptions
- "Export Once" ".zip" file type, 2gb export. Create export.
- Download and unzip the file, somewhere in there you should have
subscriptions.csv
that contains ,, - Set aside.
- On your new/target youtube account open youtube and find some channel you're not subscribed to. In chrome. this works elsewhere but i'm doing it in chrome.
- right click > inspect, or open the developer tools however you normally do. Open the Network tab and clear it out (little crossed circle icon)
- Click the subscribe button
- look in the network tab for a request like
subscribe?key=somegarbage
. Right click > copy as curl. you can do this with any of the options, fetch is good for example, but we're gonna do other bash stuff so why not curl. - Paste that request somewhere, anywhere, to save it. a text doc, or just pop it in your bash buffer if you're an
fc
god. - pop on Nation Of Language's cover of Androgynous, it's really quite nice.
As far as I can tell, this request has all the credentialling we need and doesn't expire in any short time, so it's prime for replaying. YouTube engineers, don't change this.
- Take a look at that request. In it's --data-raw blob, you'll find something like
"channelIDs":["UC3CBOpT2-NRvoc2ecFMDCsA"]
That's great, but it's only one channel ID. Let's put a bunch in there. - There are two ways you can go about this now, either serially adding channels one per request, or doing them all in bulk. The latter is potentially faster, but it does seem like the error responses you get are unhelpful so you get stuck in a "half synced" state, which is a pain.
- notice the for loop, and your need to insert a valid path
- tail is necessary to remove csv header
- reproduce the quotes around channelId exactly - the copied curl uses single quotes, which won't allow for variable expansion.
for channelId in $(cat ~/path/to/subscriptions.csv | sort | tail -n+1 | cut -f 1 -d,); do
#your saved curl command
curl 'https://www.youtube.com/youtubei/v1/subscription/subscribe?key=my-secret-key&prettyPrint=false' \
[...]
--data-raw '{...
..."channelIds": ["'${channelId}'"]...
}';
done
idk why even write this? just cause it's an option i guess. When an error is returned it's not scoped to a channel id, so it's useless. but i wrote that awk string and i'm gonna publish it
#your saved curl command
curl 'https://www.youtube.com/youtubei/v1/subscription/subscribe?key=my-secret-key&prettyPrint=false' \
[...]
--data-raw '{...
..."channelIds": ['$(cat ~/path/to/subscriptions.csv | sort | tail -n+1 | cut -f 1 -d,) | awk 'BEGIN { ORS="" } { print p"\042"$0"\042"; p="," } END { print "\n" })'']...
}'
but like don't do it this way.
- The myaccount page for your new/target account will have the number of subscriptions you have set up. Hopefully, after all this, it'll be the same number as you see on your old account!
Thanks for that!