From: James Bunton Date: Fri, 14 Jun 2013 00:50:14 +0000 (+1000) Subject: Hacked iview.py to work with ABC changes, will need to revisit this soon X-Git-Url: https://code.delx.au/webdl/commitdiff_plain/b940f8136a7c4500519ef5fe92df1ffa22a4632d Hacked iview.py to work with ABC changes, will need to revisit this soon --- diff --git a/iview.py b/iview.py index e90b79b..25176c2 100644 --- a/iview.py +++ b/iview.py @@ -11,9 +11,6 @@ HASH_URL = BASE_URL + "images/iview.jpg" NS = { "auth": "http://www.abc.net.au/iView/Services/iViewHandshaker", } -PLAYPATH_PREFIXES = { - "akamai": "flash/playback/_definst_/", -} class IviewNode(Node): def __init__(self, title, parent, params, vpath): @@ -24,13 +21,12 @@ class IviewNode(Node): def download(self): auth_doc = grab_xml(self.params["auth"], 0) - host = auth_doc.xpath("//auth:host/text()", namespaces=NS)[0] - playpath_prefix = PLAYPATH_PREFIXES.get(host.lower(), "") - vbase = auth_doc.xpath("//auth:server/text()", namespaces=NS)[0] +### vbase = auth_doc.xpath("//auth:server/text()", namespaces=NS)[0] token = auth_doc.xpath("//auth:token/text()", namespaces=NS)[0] + vbase = "rtmp://cp53909.edgefcs.net/ondemand" vbase += "?auth=" + token vpath, ext = self.vpath.rsplit(".", 1) - vpath = playpath_prefix + vpath + vpath = "flash/playback/_definst_/" + vpath vpath = ext + ":" + vpath filename = self.title + "." + ext return download_rtmp(filename, vbase, vpath, HASH_URL)