Commit bd4c5e92 authored by Daniel Watkins's avatar Daniel Watkins

Made libre.fm server default for most_recent.py.

parent 012ff872
......@@ -5,16 +5,19 @@ from optparse import OptionParser
from urllib2 import urlopen
from BeautifulSoup import BeautifulSoup
from gobble import get_parser
if __name__ == '__main__':
usage = "%prog <USERNAME> <WEB SERVER>"
parser = OptionParser(usage=usage)
usage = "%prog [-s <WEB SERVER>] <USERNAME>"
parser = get_parser(usage=usage)
parser.set_defaults(server='alpha.libre.fm')
opts,args = parser.parse_args()
if len(args) != 2:
if len(args) != 1:
parser.error("All arguments are required.")
username,server = args
username, = args
server = opts.server
if server[:7] != "http://":
server = "http://%s" % (server,)
soup = BeautifulSoup(urlopen('%s/user/%s/recent-tracks'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment