Created
February 21, 2012 17:36
-
-
Save johngian/1877600 to your computer and use it in GitHub Desktop.
8-bit.fm XML playlist parsing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import urllib2 | |
from xml.dom.minidom import parseString | |
file = urllib2.urlopen('http://dl.dropbox.com/u/1065469/8bitmusic/-playlist.xml') | |
data = file.read() | |
dom = parseString(data) | |
for i in dom.getElementsByTagName('path'): | |
out = i.toxml() | |
xmlData = out.replace('<path>','').replace('</path>','') | |
os.system("wget "+xmlData) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment