From 59d2ad3541bf133ddd69fd3b7c633e7e226e4829 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 21 Sep 2015 01:08:35 +0200 Subject: Spare improvements and fixes --- module/plugins/hoster/FilefactoryCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/FilefactoryCom.py') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 325b4bb27..aa8ea2343 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -20,7 +20,7 @@ def get_info(urls): class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" - __version__ = "0.57" + __version__ = "0.58" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?filefactory\.com/(file|trafficshare/\w+)/\w+' @@ -66,7 +66,7 @@ class FilefactoryCom(SimpleHoster): if check == "multiple": self.log_debug("Parallel downloads detected; waiting 15 minutes") - self.retry(wait_time=15 * 60, reason=_("Parallel downloads")) + self.retry(wait_time=15 * 60, msg=_("Parallel downloads")) elif check == "error": self.error(_("Unknown error")) -- cgit v1.2.3 From f9fc367427e30b7a3ca2ccad6144cb76b21f0257 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 21 Sep 2015 14:36:22 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/FilefactoryCom.py | 1 - 1 file changed, 1 deletion(-) (limited to 'module/plugins/hoster/FilefactoryCom.py') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index aa8ea2343..b13a7c793 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- import re -import urlparse from module.network.RequestFactory import getURL as get_url from module.plugins.internal.SimpleHoster import SimpleHoster, parse_fileInfo -- cgit v1.2.3 From 3353ea228835ffa96cc73d5b5e23f6d92ba84203 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 29 Sep 2015 22:43:17 +0200 Subject: Update hoster plugins --- module/plugins/hoster/FilefactoryCom.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/FilefactoryCom.py') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index b13a7c793..e8890086b 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -19,7 +19,7 @@ def get_info(urls): class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" - __version__ = "0.58" + __version__ = "0.59" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?filefactory\.com/(file|trafficshare/\w+)/\w+' @@ -59,18 +59,18 @@ class FilefactoryCom(SimpleHoster): self.wait(m.group(1)) - def check_file(self): - check = self.check_download({'multiple': "You are currently downloading too many files at once.", + def check_download(self): + check = self.check_file({'multiple': "You are currently downloading too many files at once.", 'error' : '
'}) if check == "multiple": self.log_debug("Parallel downloads detected; waiting 15 minutes") - self.retry(wait_time=15 * 60, msg=_("Parallel downloads")) + self.retry(delay=15 * 60, msg=_("Parallel downloads")) elif check == "error": self.error(_("Unknown error")) - return super(FilefactoryCom, self).check_file() + return super(FilefactoryCom, self).check_download() def handle_premium(self, pyfile): -- cgit v1.2.3 From 25d5726d4953b93a2e286fd6af8d4ead20670ba6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 1 Oct 2015 04:55:17 +0200 Subject: A lot of plugin code cosmetics --- module/plugins/hoster/FilefactoryCom.py | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'module/plugins/hoster/FilefactoryCom.py') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index e8890086b..637f3b2e0 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -50,12 +50,12 @@ class FilefactoryCom(SimpleHoster): m = re.search(self.LINK_FREE_PATTERN, self.html) if m is None: - self.error(_("Free download link not found")) + return self.link = m.group(1) m = re.search(self.WAIT_PATTERN, self.html) - if m: + if m is not None: self.wait(m.group(1)) @@ -65,21 +65,9 @@ class FilefactoryCom(SimpleHoster): if check == "multiple": self.log_debug("Parallel downloads detected; waiting 15 minutes") - self.retry(delay=15 * 60, msg=_("Parallel downloads")) + self.retry(wait=15 * 60, msg=_("Parallel downloads")) elif check == "error": self.error(_("Unknown error")) return super(FilefactoryCom, self).check_download() - - - def handle_premium(self, pyfile): - self.link = self.direct_link(self.load(pyfile.url, just_header=True)) - - if not self.link: - html = self.load(pyfile.url) - m = re.search(self.LINK_PREMIUM_PATTERN, html) - if m: - self.link = m.group(1) - else: - self.error(_("Premium download link not found")) -- cgit v1.2.3