Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
(Dirty) Script to transform YouTube's issued OMPL subscription file to a Newsboat ready format.
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 (' "YouTube" #%s' % (url, name))
if __name__ == "__main__":
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment