Files
scripts/python/text/youtube_subscriptions_render.py
2019-04-13 22:28:43 +03:00

15 lines
424 B
Python
Executable File

#!/usr/bin/env python3
# converts youtube subscriptions export .xml to simple text file
with open('subscription_manager', 'r', encoding='utf-8') as f:
while f:
line = f.readline()
if not 'channel_id' in line:
continue
idpos = line.find('channel_id=') + len('channel_id=')
channel_id = line[idpos:idpos + len('UC3Y4vKAzTCqSdOt0ZeYWvTg')]
print('https://www.youtube.com/channel/' + channel_id)