Pastebin

Paste #2449: extract-urls.py

< previous paste - next paste>

Pasted by tdn@malbec

Download View as text

#!/bin/python
import sys
if len(sys.argv) < 2:
    print "Usage: %s <podcast xml>" % sys.argv[0]
    sys.exit(1)

for xml in sys.argv[1:]:
    for x in open(xml).readlines():
        if "enclosure" in x:
            x = x.strip().split('url="')[1].split('"')[0]
            print x

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.