(Dirty) Script to transform YouTube's issued OMPL subscription file to a Newsboat ready format.
#!/usr/bin/python3 | |
from xml.dom import minidom | |
import sys | |
def main(): | |
doc = minidom.parse(str(sys.argv[1])) | |
for node in doc.firstChild.childNodes[1].firstChild.childNodes: | |
url = node.getAttribute("xmlUrl").split("=")[-1] | |
name = node.getAttribute("title") | |
print ('https://www.youtube.com/feeds/videos.xml?channel_id=%s "YouTube" #%s' % (url, name)) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment