From a40cf88920e94490d5c851fb273b8d2f48aef6fb Mon Sep 17 00:00:00 2001 From: mkaay Date: Fri, 10 Jun 2011 13:09:33 +0200 Subject: ernieb's hoster patches --- module/plugins/hoster/YourfilesTo.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/YourfilesTo.py') diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py index 2c3656c95..f2f44d41b 100644 --- a/module/plugins/hoster/YourfilesTo.py +++ b/module/plugins/hoster/YourfilesTo.py @@ -55,9 +55,13 @@ class YourfilesTo(Hoster): def get_file_url(self): """ returns the absolute downloadable filepath """ - url = re.search(r"var bla = '(.*?)';", self.html).group(1) - url = urllib.unquote(url.replace("http://http:/http://", "http://").replace("dumdidum", "")) - return url + url = re.search(r"var bla = '(.*?)';", self.html) + if url: + url = url.group(1) + url = urllib.unquote(url.replace("http://http:/http://", "http://").replace("dumdidum", "")) + return url + else: + self.fail("absolute filepath could not be found. offline? ") def get_file_name(self): if self.html is None: -- cgit v1.2.3