diff options
Diffstat (limited to 'module/plugins/hoster/YourfilesTo.py')
-rw-r--r-- | module/plugins/hoster/YourfilesTo.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py index c8c5c523c..bdb91819f 100644 --- a/module/plugins/hoster/YourfilesTo.py +++ b/module/plugins/hoster/YourfilesTo.py @@ -1,19 +1,24 @@ # -*- coding: utf-8 -*- import re -import urllib + +from urllib import unquote + from module.plugins.Hoster import Hoster class YourfilesTo(Hoster): __name__ = "YourfilesTo" __type__ = "hoster" - __pattern__ = r'(http://)?(?:www\.)?yourfiles\.(to|biz)/\?d=[a-zA-Z0-9]+' __version__ = "0.21" + + __pattern__ = r'(http://)?(?:www\.)?yourfiles\.(to|biz)/\?d=[a-zA-Z0-9]+' + __description__ = """Youfiles.to hoster plugin""" __author_name__ = ("jeix", "skydancer") __author_mail__ = ("jeix@hasnomail.de", "skydancer@hasnomail.de") + def process(self, pyfile): self.pyfile = pyfile self.prepare() @@ -31,7 +36,7 @@ class YourfilesTo(Hoster): self.wait() def get_waiting_time(self): - if self.html is None: + if not self.html: self.download_html() #var zzipitime = 15; @@ -53,13 +58,13 @@ class YourfilesTo(Hoster): 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", "")) + url = 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: + if not self.html: self.download_html() return re.search("<title>(.*)</title>", self.html).group(1) @@ -67,7 +72,7 @@ class YourfilesTo(Hoster): def file_exists(self): """ returns True or False """ - if self.html is None: + if not self.html: self.download_html() if re.search(r"HTTP Status 404", self.html) is not None: |