From 285c4bd667d303efb0818f71b2e26bc9038eeee5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 10:09:56 +0200 Subject: Update plugins --- module/plugins/hoster/FilefactoryCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/FilefactoryCom.py') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index ea1a38b7a..3aa9dc2a9 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -20,7 +20,7 @@ def getInfo(urls): class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" - __version__ = "0.55" + __version__ = "0.56" __pattern__ = r'https?://(?:www\.)?filefactory\.com/(file|trafficshare/\w+)/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -59,7 +59,7 @@ class FilefactoryCom(SimpleHoster): self.wait(m.group(1)) - def checkFile(self, rules={}): + def checkFile(self): check = self.checkDownload({'multiple': "You are currently downloading too many files at once.", 'error' : '
'}) @@ -70,7 +70,7 @@ class FilefactoryCom(SimpleHoster): elif check == "error": self.error(_("Unknown error")) - return super(FilefactoryCom, self).checkFile(rules) + return super(FilefactoryCom, self).checkFile() def handlePremium(self, pyfile): -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/hoster/FilefactoryCom.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'module/plugins/hoster/FilefactoryCom.py') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 3aa9dc2a9..8d7409824 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -7,7 +7,7 @@ from module.network.RequestFactory import getURL from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo -def getInfo(urls): +def get_info(urls): for url in urls: h = getURL(url, just_header=True) m = re.search(r'Location: (.+)\r\n', h) @@ -20,7 +20,7 @@ def getInfo(urls): class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" - __version__ = "0.56" + __version__ = "0.57" __pattern__ = r'https?://(?:www\.)?filefactory\.com/(file|trafficshare/\w+)/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -42,7 +42,7 @@ class FilefactoryCom(SimpleHoster): COOKIES = [("filefactory.com", "locale", "en_US.utf8")] - def handleFree(self, pyfile): + def handle_free(self, pyfile): if "Currently only Premium Members can download files larger than" in self.html: self.fail(_("File too large for free download")) elif "All free download slots on this server are currently in use" in self.html: @@ -59,12 +59,12 @@ class FilefactoryCom(SimpleHoster): self.wait(m.group(1)) - def checkFile(self): - check = self.checkDownload({'multiple': "You are currently downloading too many files at once.", + def check_file(self): + check = self.check_download({'multiple': "You are currently downloading too many files at once.", 'error' : '
'}) if check == "multiple": - self.logDebug("Parallel downloads detected; waiting 15 minutes") + self.log_debug("Parallel downloads detected; waiting 15 minutes") self.retry(wait_time=15 * 60, reason=_("Parallel downloads")) elif check == "error": @@ -73,8 +73,8 @@ class FilefactoryCom(SimpleHoster): return super(FilefactoryCom, self).checkFile() - def handlePremium(self, pyfile): - self.link = self.directLink(self.load(pyfile.url, just_header=True)) + 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) -- cgit v1.2.3 From 9e5d813d7721e351ac02ba72bdc473a7d77ba6b7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 18 Jul 2015 20:04:36 +0200 Subject: Code cosmetics --- module/plugins/hoster/FilefactoryCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/FilefactoryCom.py') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 8d7409824..70f1e3bab 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -3,18 +3,18 @@ import re import urlparse -from module.network.RequestFactory import getURL -from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo +from module.network.RequestFactory import getURL as get_url +from module.plugins.internal.SimpleHoster import SimpleHoster, parse_fileInfo def get_info(urls): for url in urls: - h = getURL(url, just_header=True) + h = get_url(url, just_header=True) m = re.search(r'Location: (.+)\r\n', h) if m and not re.match(m.group(1), FilefactoryCom.__pattern__): #: It's a direct link! Skipping yield (url, 0, 3, url) else: #: It's a standard html page - yield parseFileInfo(FilefactoryCom, url, getURL(url)) + yield parse_fileInfo(FilefactoryCom, url, get_url(url)) class FilefactoryCom(SimpleHoster): -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/hoster/FilefactoryCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/FilefactoryCom.py') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 70f1e3bab..6ee53585f 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -21,6 +21,7 @@ class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" __version__ = "0.57" + __status__ = "stable" __pattern__ = r'https?://(?:www\.)?filefactory\.com/(file|trafficshare/\w+)/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- module/plugins/hoster/FilefactoryCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilefactoryCom.py') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 6ee53585f..8c8e01ed5 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -21,7 +21,7 @@ class FilefactoryCom(SimpleHoster): __name__ = "FilefactoryCom" __type__ = "hoster" __version__ = "0.57" - __status__ = "stable" + __status__ = "testing" __pattern__ = r'https?://(?:www\.)?filefactory\.com/(file|trafficshare/\w+)/\w+' __config__ = [("use_premium", "bool", "Use premium account if available", True)] -- cgit v1.2.3 From 5ceb174cb7eb6a3cf706a1ed861ddd778069d7b6 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 27 Jul 2015 10:29:06 +0200 Subject: Then update others --- module/plugins/hoster/FilefactoryCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilefactoryCom.py') diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py index 8c8e01ed5..325b4bb27 100644 --- a/module/plugins/hoster/FilefactoryCom.py +++ b/module/plugins/hoster/FilefactoryCom.py @@ -71,7 +71,7 @@ class FilefactoryCom(SimpleHoster): elif check == "error": self.error(_("Unknown error")) - return super(FilefactoryCom, self).checkFile() + return super(FilefactoryCom, self).check_file() def handle_premium(self, pyfile): -- cgit v1.2.3