Skip to content

Instantly share code, notes, and snippets.

@genbtc
Last active March 19, 2021 02:03
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 genbtc/05036bf94f6bf03aff5b9682f2e5fd23 to your computer and use it in GitHub Desktop.
Save genbtc/05036bf94f6bf03aff5b9682f2e5fd23 to your computer and use it in GitHub Desktop.
extract google youtube subscriptions.json
#!/usr/bin/env python3
SUBSFILE = 'GoogleTakeout/Takeout/YouTube and YouTube Music/subscriptions/subscriptions.json'
import json
with open(SUBSFILE, 'r') as subs:
f = json.load(subs)
for line in f:
print(line["snippet"]["title"])
print("https://www.youtube.com/channel/" + line["snippet"]["resourceId"]["channelId"])
# print(line["snippet"]["title"] + " https://www.youtube.com/channel/" + line["snippet"]["resourceId"]["channelId"])
# print(line["snippet"]["description"])
print('-'*120)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment