From 8c464f3d07a8f13838c7c118cf503e6f50ea3ac3 Mon Sep 17 00:00:00 2001 From: James Bunton Date: Sat, 8 Sep 2012 13:24:11 +1000 Subject: [PATCH] Fixed grab-abc-stream --- ripping/grab-abc-stream | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ripping/grab-abc-stream b/ripping/grab-abc-stream index 7db0449..d338020 100755 --- a/ripping/grab-abc-stream +++ b/ripping/grab-abc-stream @@ -65,8 +65,8 @@ def grab(u): doc = etree.parse(urllib.urlopen(wmfile)) streams = doc.xpath("//ref/@href") - author = qs["pgm"] - title = qs["t"] + author = qs["pgm"][0] + title = qs["t"][0] for stream in streams: if not stream.startswith("mms://"): @@ -77,6 +77,8 @@ def grab(u): print "Paste 'Listen Now' URLs from ABC... Press CTRL-D to finish" try: for line in sys.stdin: + if not line.strip(): + continue grab(line) except KeyboardInterrupt: print "\nExiting..." -- 2.39.2