Skip to content

Instantly share code, notes, and snippets.

@mhl
Created May 4, 2015 14:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhl/e75f8a4e2e041f570138 to your computer and use it in GitHub Desktop.
Save mhl/e75f8a4e2e041f570138 to your computer and use it in GitHub Desktop.
An old script for downloading albums from EMusic, no idea if it still works
#!/usr/bin/env python
import sys
import os
from subprocess import check_call
from lxml import etree
if len(sys.argv) != 2:
print >> sys.stderr, "Usage: %s [EMX-FILE]" % (sys.argv[0])
sys.exit(1)
data = etree.parse(sys.argv[1])
for tu in data.xpath("//TRACKURL"):
check_call(['wget','-c',tu.text])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment