@@ -1,11 +1,11 @@ # encoding: UTF-8 # api: streamtuner2 # title: Delicast # description: directory of streaming media # url: http://delicast.com/ -# version: 0.4 +# version: 0.5 # type: channel # category: radio # config: - # png: # iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA @@ -85,8 +85,11 @@ # Update `url` on station data access (incurs a delay for playing or recording) def resolve_urn(self, row): if row.get("url").startswith("urn:delicast"): html = ahttp.get(row["homepage"]) ls = re.findall("^var url = \"(.+)\";", html, re.M) - row["url"] = ls[0] + if ls: + row["url"] = unhtml(ls[0]) + else: + log.ERR("No stream found on %s" % row["homepage"]) return row