diff options
Diffstat (limited to 'module/plugins/hoster/ARD.py')
-rw-r--r-- | module/plugins/hoster/ARD.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/module/plugins/hoster/ARD.py b/module/plugins/hoster/ARD.py index 5ab65cd4b..4404994b3 100644 --- a/module/plugins/hoster/ARD.py +++ b/module/plugins/hoster/ARD.py @@ -1,4 +1,3 @@ - import subprocess import re import os.path @@ -10,6 +9,7 @@ from module.plugins.Hoster import Hoster # Requires rtmpdump # by Roland Beermann + class RTMP: # TODO: Port to some RTMP-library like rtmpy or similar # TODO?: Integrate properly into the API of pyLoad @@ -37,17 +37,20 @@ class RTMP: return subprocess.check_call(args) + class ARD(Hoster): __name__ = "ARD Mediathek" - __version__ = "0.1" + __version__ = "0.11" __pattern__ = r"http://www\.ardmediathek\.de/.*" __config__ = [] def process(self, pyfile): site = self.load(pyfile.url) - avail_videos = re.findall(r"""mediaCollection.addMediaStream\(0, ([0-9]*), "([^\"]*)", "([^\"]*)", "[^\"]*"\);""", site) - avail_videos.sort(key=lambda videodesc: int(videodesc[0]), reverse=True) # The higher the number, the better the quality + avail_videos = re.findall( + r'mediaCollection.addMediaStream\(0, ([0-9]*), "([^\"]*)", "([^\"]*)", "[^\"]*"\);', site) + avail_videos.sort(key=lambda videodesc: int(videodesc[0]), + reverse=True) # The higher the number, the better the quality quality, url, playpath = avail_videos[0] @@ -73,7 +76,7 @@ class ARD(Hoster): chown(location, uid, gid) except Exception, e: - self.log.warning(_("Setting User and Group failed: %s") % str(e)) + self.logWarning(_("Setting User and Group failed: %s") % str(e)) output_file = save_join(location, save_path(pyfile.name)) + os.path.splitext(playpath)[1] |