From 93592862b520a862c01f80c019e5c4bc43746c19 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 5 Jul 2014 16:54:20 +0200 Subject: [SimpleHoster] Better inline docs + changed "FILE_OFFLINE_PATTERN" to "OFFLINE_PATTERN" --- module/plugins/hoster/FilerNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index d39666922..9a2bbafbf 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -36,7 +36,7 @@ class FilerNet(SimpleHoster): __author_mail__ = "l.stickell@yahoo.it" FILE_INFO_PATTERN = r'

Free Download (?P\S+) (?P[\w.]+) (?P\w+)

' - FILE_OFFLINE_PATTERN = r'Nicht gefunden' + OFFLINE_PATTERN = r'Nicht gefunden' RECAPTCHA_KEY = '6LcFctISAAAAAAgaeHgyqhNecGJJRnxV1m_vAz3V' DIRECT_LINK_PATTERN = r'href="([^"]+)">Get download' -- cgit v1.2.3 From 04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 10 Jul 2014 03:02:26 +0200 Subject: Use parseError instead PluginParseError + unified all download pattern attributes as LINK_PATTERN + removed some old patterns (not used anymore) + other code cosmetics --- module/plugins/hoster/FilerNet.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 9a2bbafbf..72396fac6 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -37,8 +37,9 @@ class FilerNet(SimpleHoster): FILE_INFO_PATTERN = r'

Free Download (?P\S+) (?P[\w.]+) (?P\w+)

' OFFLINE_PATTERN = r'Nicht gefunden' - RECAPTCHA_KEY = '6LcFctISAAAAAAgaeHgyqhNecGJJRnxV1m_vAz3V' - DIRECT_LINK_PATTERN = r'href="([^"]+)">Get download' + RECAPTCHA_KEY = "6LcFctISAAAAAAgaeHgyqhNecGJJRnxV1m_vAz3V" + LINK_PATTERN = r'href="([^"]+)">Get download' + def process(self, pyfile): if self.premium and (not self.SH_CHECK_TRAFFIC or self.checkTrafficLeft()): @@ -74,7 +75,7 @@ class FilerNet(SimpleHoster): hash_data = inputs['hash'] self.logDebug('Hash: ' + hash_data) - downloadURL = '' + downloadURL = r'' recaptcha = ReCaptcha(self) for _ in xrange(5): challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY) @@ -107,7 +108,7 @@ class FilerNet(SimpleHoster): dl = self.pyfile.url else: # Direct Download OFF html = self.load(self.pyfile.url) - m = re.search(self.DIRECT_LINK_PATTERN, html) + m = re.search(self.LINK_PATTERN, html) if not m: self.parseError("Unable to detect direct link, try to enable 'Direct download' in your user settings") dl = 'http://filer.net' + m.group(1) -- cgit v1.2.3 From 05d258d98dd8c2faf0b769840fa1e3c4acccdce8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 20 Jul 2014 03:25:14 +0200 Subject: Fix and improve 5060e4c6374a5116d0d8b02528f910f8c5f8bcf9 --- module/plugins/hoster/FilerNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 72396fac6..91805ca40 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -109,7 +109,7 @@ class FilerNet(SimpleHoster): else: # Direct Download OFF html = self.load(self.pyfile.url) m = re.search(self.LINK_PATTERN, html) - if not m: + if m is None: self.parseError("Unable to detect direct link, try to enable 'Direct download' in your user settings") dl = 'http://filer.net' + m.group(1) -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/hoster/FilerNet.py | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 91805ca40..a36607f8a 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -1,36 +1,25 @@ # -*- coding: utf-8 -*- -############################################################################ -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU Affero General Public License as # -# published by the Free Software Foundation, either version 3 of the # -# License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU Affero General Public License for more details. # -# # -# You should have received a copy of the GNU Affero General Public License # -# along with this program. If not, see . # -############################################################################ - -# Test links (random.bin): +# +# Test links: # http://filer.net/get/ivgf5ztw53et3ogd # http://filer.net/get/hgo14gzcng3scbvv import pycurl import re + from urlparse import urljoin -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.plugins.internal.CaptchaService import ReCaptcha +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __pattern__ = r'https?://(?:www\.)?filer\.net/get/(\w+)' __version__ = "0.03" + + __pattern__ = r'https?://(?:www\.)?filer\.net/get/(\w+)' + __description__ = """Filer.net hoster plugin""" __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" -- cgit v1.2.3 From 4709a41c176dd2947709b7f35ccc84213d574624 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 26 Sep 2014 16:59:26 +0200 Subject: Rename SH flags --- module/plugins/hoster/FilerNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index a36607f8a..b4cb314b6 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -31,14 +31,14 @@ class FilerNet(SimpleHoster): def process(self, pyfile): - if self.premium and (not self.SH_CHECK_TRAFFIC or self.checkTrafficLeft()): + if self.premium and (not self.FORCE_CHECK_TRAFFIC or self.checkTrafficLeft()): self.handlePremium() else: self.handleFree() def handleFree(self): self.req.setOption("timeout", 120) - self.html = self.load(self.pyfile.url, decode=not self.SH_BROKEN_ENCODING, cookies=self.SH_COOKIES) + self.html = self.load(self.pyfile.url, decode=not self.TEXT_ENCODING, cookies=self.COOKIES) # Wait between downloads m = re.search(r'musst du (\d+) Sekunden warten', self.html) -- cgit v1.2.3 From 0d220d634e512d89bda540f91c643b361c82ea8a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Sep 2014 01:38:32 +0200 Subject: Logging string cosmetics --- module/plugins/hoster/FilerNet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index b4cb314b6..3ad9f2091 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -54,7 +54,7 @@ class FilerNet(SimpleHoster): if 'token' not in inputs: self.parseError('Unable to detect token') token = inputs['token'] - self.logDebug('Token: ' + token) + self.logDebug("Token: " + token) self.html = self.load(self.pyfile.url, post={'token': token}, decode=True) @@ -62,7 +62,7 @@ class FilerNet(SimpleHoster): if 'hash' not in inputs: self.parseError('Unable to detect hash') hash_data = inputs['hash'] - self.logDebug('Hash: ' + hash_data) + self.logDebug("Hash: " + hash_data) downloadURL = r'' recaptcha = ReCaptcha(self) @@ -83,7 +83,7 @@ class FilerNet(SimpleHoster): self.correctCaptcha() break else: - self.logInfo('Wrong captcha') + self.logInfo("Wrong captcha") self.invalidCaptcha() if not downloadURL: @@ -102,7 +102,7 @@ class FilerNet(SimpleHoster): self.parseError("Unable to detect direct link, try to enable 'Direct download' in your user settings") dl = 'http://filer.net' + m.group(1) - self.logDebug('Direct link: ' + dl) + self.logDebug("Direct link: " + dl) self.download(dl, disposition=True) -- cgit v1.2.3 From 23ae563604dca1dae262fbc598154b99b2f1eae8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 3 Oct 2014 09:06:05 +0200 Subject: Update plugins after CaptchaService and XFileSharingPro changes --- module/plugins/hoster/FilerNet.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 3ad9f2091..3082c790b 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -26,7 +26,6 @@ class FilerNet(SimpleHoster): FILE_INFO_PATTERN = r'

Free Download (?P\S+) (?P[\w.]+) (?P\w+)

' OFFLINE_PATTERN = r'Nicht gefunden' - RECAPTCHA_KEY = "6LcFctISAAAAAAgaeHgyqhNecGJJRnxV1m_vAz3V" LINK_PATTERN = r'href="([^"]+)">Get download' @@ -65,9 +64,15 @@ class FilerNet(SimpleHoster): self.logDebug("Hash: " + hash_data) downloadURL = r'' + recaptcha = ReCaptcha(self) + + captcha_key = recaptcha.detect_key() + if captcha_key is None: + self.parseError("ReCaptcha key not found") + for _ in xrange(5): - challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY) + challenge, response = recaptcha.challenge(captcha_key) post_data = {'recaptcha_challenge_field': challenge, 'recaptcha_response_field': response, 'hash': hash_data} -- cgit v1.2.3 From e460158ca521afe0540c9c53b91806b31f307217 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 4 Oct 2014 22:46:13 +0200 Subject: Fix broken plugins after SH_COOKIES -> COOKIES --- module/plugins/hoster/FilerNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 3082c790b..076b609dd 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'https?://(?:www\.)?filer\.net/get/(\w+)' -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/hoster/FilerNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 076b609dd..fedf76072 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -21,8 +21,8 @@ class FilerNet(SimpleHoster): __pattern__ = r'https?://(?:www\.)?filer\.net/get/(\w+)' __description__ = """Filer.net hoster plugin""" - __author_name__ = "stickell" - __author_mail__ = "l.stickell@yahoo.it" + __authors__ = [("stickell", "l.stickell@yahoo.it")] + FILE_INFO_PATTERN = r'

Free Download (?P\S+) (?P[\w.]+) (?P\w+)

' OFFLINE_PATTERN = r'Nicht gefunden' -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/hoster/FilerNet.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index fedf76072..31bb7082a 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -21,6 +21,7 @@ class FilerNet(SimpleHoster): __pattern__ = r'https?://(?:www\.)?filer\.net/get/(\w+)' __description__ = """Filer.net hoster plugin""" + __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] -- cgit v1.2.3 From 388a2f6478d42e423f1f8442d8539983f3762f22 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 14 Oct 2014 13:38:49 +0200 Subject: Improve unit detection in size pattern --- module/plugins/hoster/FilerNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 31bb7082a..c8211b435 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -25,7 +25,7 @@ class FilerNet(SimpleHoster): __authors__ = [("stickell", "l.stickell@yahoo.it")] - FILE_INFO_PATTERN = r'

Free Download (?P\S+) (?P[\w.]+) (?P\w+)

' + FILE_INFO_PATTERN = r'

Free Download (?P\S+) (?P[\w.]+) (?P[\w^_]+)

' OFFLINE_PATTERN = r'Nicht gefunden' LINK_PATTERN = r'href="([^"]+)">Get download' -- cgit v1.2.3 From 0b9f23cd350d5dd9f4ba16c748838fa9a2d553c8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 18 Oct 2014 18:02:05 +0200 Subject: [FilerNet] Revert captcha_key --- module/plugins/hoster/FilerNet.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index c8211b435..7534c669d 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'https?://(?:www\.)?filer\.net/get/(\w+)' @@ -27,8 +27,11 @@ class FilerNet(SimpleHoster): FILE_INFO_PATTERN = r'

Free Download (?P\S+) (?P[\w.]+) (?P[\w^_]+)

' OFFLINE_PATTERN = r'Nicht gefunden' + LINK_PATTERN = r'href="([^"]+)">Get download' + RECAPTCHA_KEY = "6LcFctISAAAAAAgaeHgyqhNecGJJRnxV1m_vAz3V" + def process(self, pyfile): if self.premium and (not self.FORCE_CHECK_TRAFFIC or self.checkTrafficLeft()): @@ -36,6 +39,7 @@ class FilerNet(SimpleHoster): else: self.handleFree() + def handleFree(self): self.req.setOption("timeout", 120) self.html = self.load(self.pyfile.url, decode=not self.TEXT_ENCODING, cookies=self.COOKIES) @@ -68,12 +72,8 @@ class FilerNet(SimpleHoster): recaptcha = ReCaptcha(self) - captcha_key = recaptcha.detect_key() - if captcha_key is None: - self.parseError("ReCaptcha key not found") - for _ in xrange(5): - challenge, response = recaptcha.challenge(captcha_key) + challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY) post_data = {'recaptcha_challenge_field': challenge, 'recaptcha_response_field': response, 'hash': hash_data} @@ -97,6 +97,7 @@ class FilerNet(SimpleHoster): self.download(downloadURL, disposition=True) + def handlePremium(self): header = self.load(self.pyfile.url, just_header=True) if 'location' in header: # Direct Download ON -- cgit v1.2.3 From 2ae91b81a2f12a1c9b1f78524df78a2b3f1ef494 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Oct 2014 14:52:42 +0200 Subject: Update hosters to self.error --- module/plugins/hoster/FilerNet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 7534c669d..46c914e9b 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.05" + __version__ = "0.06" __pattern__ = r'https?://(?:www\.)?filer\.net/get/(\w+)' @@ -56,7 +56,7 @@ class FilerNet(SimpleHoster): inputs = self.parseHtmlForm(input_names='token')[1] if 'token' not in inputs: - self.parseError('Unable to detect token') + self.error('Unable to detect token') token = inputs['token'] self.logDebug("Token: " + token) @@ -64,7 +64,7 @@ class FilerNet(SimpleHoster): inputs = self.parseHtmlForm(input_names='hash')[1] if 'hash' not in inputs: - self.parseError('Unable to detect hash') + self.error('Unable to detect hash') hash_data = inputs['hash'] self.logDebug("Hash: " + hash_data) @@ -106,7 +106,7 @@ class FilerNet(SimpleHoster): html = self.load(self.pyfile.url) m = re.search(self.LINK_PATTERN, html) if m is None: - self.parseError("Unable to detect direct link, try to enable 'Direct download' in your user settings") + self.error("Unable to detect direct link, try to enable 'Direct download' in your user settings") dl = 'http://filer.net' + m.group(1) self.logDebug("Direct link: " + dl) -- cgit v1.2.3 From dabee359dd8c3870e0302e99457e6dd1bb93d736 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 21 Oct 2014 16:01:05 +0200 Subject: Remove needless self.html --- module/plugins/hoster/FilerNet.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 46c914e9b..7a850a849 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -41,9 +41,6 @@ class FilerNet(SimpleHoster): def handleFree(self): - self.req.setOption("timeout", 120) - self.html = self.load(self.pyfile.url, decode=not self.TEXT_ENCODING, cookies=self.COOKIES) - # Wait between downloads m = re.search(r'musst du (\d+) Sekunden warten', self.html) if m: -- cgit v1.2.3 From 0672bc1e4a19aeff19416084de3d68cff4a5b390 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 14:30:37 +0200 Subject: [FilerNet] Revert last revert XD --- module/plugins/hoster/FilerNet.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 7a850a849..6d62dfde8 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.06" + __version__ = "0.07" __pattern__ = r'https?://(?:www\.)?filer\.net/get/(\w+)' @@ -30,15 +30,6 @@ class FilerNet(SimpleHoster): LINK_PATTERN = r'href="([^"]+)">Get download' - RECAPTCHA_KEY = "6LcFctISAAAAAAgaeHgyqhNecGJJRnxV1m_vAz3V" - - - def process(self, pyfile): - if self.premium and (not self.FORCE_CHECK_TRAFFIC or self.checkTrafficLeft()): - self.handlePremium() - else: - self.handleFree() - def handleFree(self): # Wait between downloads @@ -47,8 +38,6 @@ class FilerNet(SimpleHoster): waittime = int(m.group(1)) self.retry(3, waittime, "Wait between free downloads") - self.getFileInfo() - self.html = self.load(self.pyfile.url, decode=True) inputs = self.parseHtmlForm(input_names='token')[1] @@ -69,8 +58,12 @@ class FilerNet(SimpleHoster): recaptcha = ReCaptcha(self) + captcha_key = recaptcha.detect_key() + if captcha_key is None: + self.parseError("ReCaptcha key not found") + for _ in xrange(5): - challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY) + challenge, response = recaptcha.challenge(captcha_key) post_data = {'recaptcha_challenge_field': challenge, 'recaptcha_response_field': response, 'hash': hash_data} -- cgit v1.2.3 From 1b096b2eb2634e8dea80b06ab9ecde206b198b35 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 19:47:00 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/FilerNet.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 6d62dfde8..7a8d49378 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -18,7 +18,7 @@ class FilerNet(SimpleHoster): __type__ = "hoster" __version__ = "0.07" - __pattern__ = r'https?://(?:www\.)?filer\.net/get/(\w+)' + __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' __description__ = """Filer.net hoster plugin""" __license__ = "GPLv3" @@ -35,8 +35,7 @@ class FilerNet(SimpleHoster): # Wait between downloads m = re.search(r'musst du (\d+) Sekunden warten', self.html) if m: - waittime = int(m.group(1)) - self.retry(3, waittime, "Wait between free downloads") + self.retry(wait_time=int(m.group(1)), reason="Wait between free downloads") self.html = self.load(self.pyfile.url, decode=True) -- cgit v1.2.3 From 7b67f68c1636014fe02286da71bdc6c13dc3eeee Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 23 Oct 2014 00:50:23 +0200 Subject: Simplify captcha challenge calls --- module/plugins/hoster/FilerNet.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 7a8d49378..e02f5a37c 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -54,15 +54,10 @@ class FilerNet(SimpleHoster): self.logDebug("Hash: " + hash_data) downloadURL = r'' - recaptcha = ReCaptcha(self) - captcha_key = recaptcha.detect_key() - if captcha_key is None: - self.parseError("ReCaptcha key not found") - for _ in xrange(5): - challenge, response = recaptcha.challenge(captcha_key) + challenge, response = recaptcha.challenge() post_data = {'recaptcha_challenge_field': challenge, 'recaptcha_response_field': response, 'hash': hash_data} -- cgit v1.2.3 From 4da90891eb2544ac15a7d512aba8cb357f68ee5f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Oct 2014 01:11:29 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/FilerNet.py | 1 - 1 file changed, 1 deletion(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index e02f5a37c..9bb00ba92 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -73,7 +73,6 @@ class FilerNet(SimpleHoster): self.correctCaptcha() break else: - self.logInfo("Wrong captcha") self.invalidCaptcha() if not downloadURL: -- cgit v1.2.3 From e3f5280529921100f48bb8a79853bf480c7611e4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Oct 2014 02:53:05 +0200 Subject: Replace single quotes with doubles in self.error and self.fail msg --- module/plugins/hoster/FilerNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 9bb00ba92..0d4cb43a4 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -41,7 +41,7 @@ class FilerNet(SimpleHoster): inputs = self.parseHtmlForm(input_names='token')[1] if 'token' not in inputs: - self.error('Unable to detect token') + self.error("Unable to detect token") token = inputs['token'] self.logDebug("Token: " + token) @@ -49,7 +49,7 @@ class FilerNet(SimpleHoster): inputs = self.parseHtmlForm(input_names='hash')[1] if 'hash' not in inputs: - self.error('Unable to detect hash') + self.error("Unable to detect hash") hash_data = inputs['hash'] self.logDebug("Hash: " + hash_data) -- cgit v1.2.3 From 1c4bf83881d2a22da3773666a580d51f6b57bfd1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Oct 2014 03:07:21 +0200 Subject: Avoid gettext conflict due variable `_` --- module/plugins/hoster/FilerNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 0d4cb43a4..d45289fc0 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -56,7 +56,7 @@ class FilerNet(SimpleHoster): downloadURL = r'' recaptcha = ReCaptcha(self) - for _ in xrange(5): + for _i in xrange(5): challenge, response = recaptcha.challenge() post_data = {'recaptcha_challenge_field': challenge, 'recaptcha_response_field': response, -- cgit v1.2.3 From 9f2ebe486a3e155fb6a60e07cccb77ab6a772eb2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 26 Oct 2014 02:31:54 +0200 Subject: Extend translation support in plugins + a lot of code cosmetics and typo fixes --- module/plugins/hoster/FilerNet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index d45289fc0..9a34f8872 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -41,7 +41,7 @@ class FilerNet(SimpleHoster): inputs = self.parseHtmlForm(input_names='token')[1] if 'token' not in inputs: - self.error("Unable to detect token") + self.error(_("Unable to detect token")) token = inputs['token'] self.logDebug("Token: " + token) @@ -49,7 +49,7 @@ class FilerNet(SimpleHoster): inputs = self.parseHtmlForm(input_names='hash')[1] if 'hash' not in inputs: - self.error("Unable to detect hash") + self.error(_("Unable to detect hash")) hash_data = inputs['hash'] self.logDebug("Hash: " + hash_data) @@ -76,7 +76,7 @@ class FilerNet(SimpleHoster): self.invalidCaptcha() if not downloadURL: - self.fail("No Download url retrieved/all captcha attempts failed") + self.fail(_("No Download url retrieved/all captcha attempts failed")) self.download(downloadURL, disposition=True) @@ -89,7 +89,7 @@ class FilerNet(SimpleHoster): html = self.load(self.pyfile.url) m = re.search(self.LINK_PATTERN, html) if m is None: - self.error("Unable to detect direct link, try to enable 'Direct download' in your user settings") + self.error(_("LINK_PATTERN not found")) dl = 'http://filer.net' + m.group(1) self.logDebug("Direct link: " + dl) -- cgit v1.2.3 From 146fe1e309c33ab149bfaf58ad86c0dd4fb9b156 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 27 Oct 2014 01:18:45 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/FilerNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 9a34f8872..30df70a82 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -35,7 +35,7 @@ class FilerNet(SimpleHoster): # Wait between downloads m = re.search(r'musst du (\d+) Sekunden warten', self.html) if m: - self.retry(wait_time=int(m.group(1)), reason="Wait between free downloads") + self.retry(wait_time=int(m.group(1)), reason=_("Wait between free downloads")) self.html = self.load(self.pyfile.url, decode=True) -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/hoster/FilerNet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 30df70a82..b8ad77abe 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -14,15 +14,15 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): - __name__ = "FilerNet" - __type__ = "hoster" + __name__ = "FilerNet" + __type__ = "hoster" __version__ = "0.07" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' __description__ = """Filer.net hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("stickell", "l.stickell@yahoo.it")] + __license__ = "GPLv3" + __authors__ = [("stickell", "l.stickell@yahoo.it")] FILE_INFO_PATTERN = r'

Free Download (?P\S+) (?P[\w.]+) (?P[\w^_]+)

' -- cgit v1.2.3 From 772e47ef806d18fd209e910be0535bce7c07dc7b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 2 Nov 2014 22:47:07 +0100 Subject: Update all other plugins --- module/plugins/hoster/FilerNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index b8ad77abe..c91729730 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -25,7 +25,7 @@ class FilerNet(SimpleHoster): __authors__ = [("stickell", "l.stickell@yahoo.it")] - FILE_INFO_PATTERN = r'

Free Download (?P\S+) (?P[\w.]+) (?P[\w^_]+)

' + INFO_PATTERN = r'

Free Download (?P\S+) (?P[\w.]+) (?P[\w^_]+)

' OFFLINE_PATTERN = r'Nicht gefunden' LINK_PATTERN = r'href="([^"]+)">Get download' -- cgit v1.2.3 From 86d3b6249073947132ed3a9eeb1b1e987d19569a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 1 Dec 2014 18:17:13 +0100 Subject: Update some plugins --- module/plugins/hoster/FilerNet.py | 1 - 1 file changed, 1 deletion(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index c91729730..3bfafc675 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -92,7 +92,6 @@ class FilerNet(SimpleHoster): self.error(_("LINK_PATTERN not found")) dl = 'http://filer.net' + m.group(1) - self.logDebug("Direct link: " + dl) self.download(dl, disposition=True) -- cgit v1.2.3 From 809760324bba667ae725c7fdd68a0ab86baddcd9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 3 Dec 2014 14:47:12 +0100 Subject: [FilerNet] Fix https://github.com/pyload/pyload/issues/897 --- module/plugins/hoster/FilerNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 3bfafc675..d9876c573 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.07" + __version__ = "0.08" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' @@ -39,7 +39,7 @@ class FilerNet(SimpleHoster): self.html = self.load(self.pyfile.url, decode=True) - inputs = self.parseHtmlForm(input_names='token')[1] + inputs = self.parseHtmlForm(input_names={'token': re.compile(r'.+')})[1] if 'token' not in inputs: self.error(_("Unable to detect token")) token = inputs['token'] @@ -47,7 +47,7 @@ class FilerNet(SimpleHoster): self.html = self.load(self.pyfile.url, post={'token': token}, decode=True) - inputs = self.parseHtmlForm(input_names='hash')[1] + inputs = self.parseHtmlForm(input_names={'hash': re.compile(r'.+')})[1] if 'hash' not in inputs: self.error(_("Unable to detect hash")) hash_data = inputs['hash'] -- cgit v1.2.3 From dc05dcc1dcd44cdad8a6bdd0a539c5a8124d4820 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 5 Dec 2014 19:29:24 +0100 Subject: [FilerNet] Cleanup --- module/plugins/hoster/FilerNet.py | 64 ++++++++++++++------------------------- 1 file changed, 22 insertions(+), 42 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index d9876c573..2b98788bb 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -4,7 +4,6 @@ # http://filer.net/get/ivgf5ztw53et3ogd # http://filer.net/get/hgo14gzcng3scbvv -import pycurl import re from urlparse import urljoin @@ -16,83 +15,64 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' __description__ = """Filer.net hoster plugin""" __license__ = "GPLv3" - __authors__ = [("stickell", "l.stickell@yahoo.it")] + __authors__ = [("stickell", "l.stickell@yahoo.it") + ("Walter Purcaro", "vuolter@gmail.com")] - INFO_PATTERN = r'

Free Download (?P\S+) (?P[\w.]+) (?P[\w^_]+)

' + CONTENT_DISPOSITION = True + + INFO_PATTERN = r'

Free Download (?P\S+) (?P[\w.]+) (?P[\w^_]+)

' OFFLINE_PATTERN = r'Nicht gefunden' - LINK_PATTERN = r'href="([^"]+)">Get download' + LINK_FREE_PATTERN = LINK_PREMIUM_PATTERN = r'href="([^"]+)">Get download' - def handleFree(self): + def checkErrors(self): # Wait between downloads m = re.search(r'musst du (\d+) Sekunden warten', self.html) if m: self.retry(wait_time=int(m.group(1)), reason=_("Wait between free downloads")) - self.html = self.load(self.pyfile.url, decode=True) + def handleFree(self): inputs = self.parseHtmlForm(input_names={'token': re.compile(r'.+')})[1] if 'token' not in inputs: self.error(_("Unable to detect token")) - token = inputs['token'] - self.logDebug("Token: " + token) - self.html = self.load(self.pyfile.url, post={'token': token}, decode=True) + self.html = self.load(self.pyfile.url, post={'token': inputs['token']}, decode=True) inputs = self.parseHtmlForm(input_names={'hash': re.compile(r'.+')})[1] if 'hash' not in inputs: self.error(_("Unable to detect hash")) - hash_data = inputs['hash'] - self.logDebug("Hash: " + hash_data) - downloadURL = r'' recaptcha = ReCaptcha(self) for _i in xrange(5): challenge, response = recaptcha.challenge() - post_data = {'recaptcha_challenge_field': challenge, - 'recaptcha_response_field': response, - 'hash': hash_data} - - # Workaround for 0.4.9 just_header issue. In 0.5 clean the code using just_header - self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) - self.load(self.pyfile.url, post=post_data) - self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1) - - if 'location' in self.req.http.header.lower(): - location = re.search(r'location: (\S+)', self.req.http.header, re.I).group(1) - downloadURL = urljoin('http://filer.net', location) + + header = self.load(self.pyfile.url, + post={'recaptcha_challenge_field': challenge, + 'recaptcha_response_field' : response, + 'hash' : inputs['hash']}) + + if 'location' in header and header['location']: self.correctCaptcha() - break + self.link = urljoin('http://filer.net', header['location']) + return else: self.invalidCaptcha() - if not downloadURL: - self.fail(_("No Download url retrieved/all captcha attempts failed")) - - self.download(downloadURL, disposition=True) - def handlePremium(self): - header = self.load(self.pyfile.url, just_header=True) - if 'location' in header: # Direct Download ON - dl = self.pyfile.url - else: # Direct Download OFF - html = self.load(self.pyfile.url) - m = re.search(self.LINK_PATTERN, html) - if m is None: - self.error(_("LINK_PATTERN not found")) - dl = 'http://filer.net' + m.group(1) - - self.download(dl, disposition=True) + super(FilerNet, self).handlePremium() + if self.link: + self.link = urljoin("http://filer.net/", self.link) getInfo = create_getInfo(FilerNet) -- cgit v1.2.3 From 5a23de6f32dc99960cccd634d2fd2cc47c34be2a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 5 Dec 2014 23:08:44 +0100 Subject: Code cosmetics about checkErrors --- module/plugins/hoster/FilerNet.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 2b98788bb..c943a076d 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -37,7 +37,10 @@ class FilerNet(SimpleHoster): # Wait between downloads m = re.search(r'musst du (\d+) Sekunden warten', self.html) if m: - self.retry(wait_time=int(m.group(1)), reason=_("Wait between free downloads")) + errmsg = self.info['error'] = _("Wait between free downloads") + self.retry(wait_time=int(m.group(1)), reason=errmsg) + + self.info.pop('error', None) def handleFree(self): -- cgit v1.2.3 From 430092f0ba67e4bb2dd75433b08340d0afca0fa9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 12 Dec 2014 20:34:42 +0100 Subject: Update plugins after SimpleHoster changes --- module/plugins/hoster/FilerNet.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index c943a076d..5dd72efe7 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -15,7 +15,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.09" + __version__ = "0.10" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' @@ -25,8 +25,6 @@ class FilerNet(SimpleHoster): ("Walter Purcaro", "vuolter@gmail.com")] - CONTENT_DISPOSITION = True - INFO_PATTERN = r'

Free Download (?P\S+) (?P[\w.]+) (?P[\w^_]+)

' OFFLINE_PATTERN = r'Nicht gefunden' @@ -66,16 +64,17 @@ class FilerNet(SimpleHoster): if 'location' in header and header['location']: self.correctCaptcha() - self.link = urljoin('http://filer.net', header['location']) + self.link = header['location'] return else: self.invalidCaptcha() - def handlePremium(self): - super(FilerNet, self).handlePremium() - if self.link: - self.link = urljoin("http://filer.net/", self.link) + def downloadLink(self, link): + if not link: + return + + self.download(urljoin("http://filer.net/", link), disposition=True) getInfo = create_getInfo(FilerNet) -- cgit v1.2.3 From 3d27f5ccee412d38102873a5b02e3f236375eb97 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 16 Dec 2014 03:44:15 +0100 Subject: Update plugins (2) --- module/plugins/hoster/FilerNet.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 5dd72efe7..5a33439d2 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -4,6 +4,7 @@ # http://filer.net/get/ivgf5ztw53et3ogd # http://filer.net/get/hgo14gzcng3scbvv +import pycurl import re from urlparse import urljoin @@ -15,13 +16,13 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.10" + __version__ = "0.11" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' __description__ = """Filer.net hoster plugin""" __license__ = "GPLv3" - __authors__ = [("stickell", "l.stickell@yahoo.it") + __authors__ = [("stickell", "l.stickell@yahoo.it"), ("Walter Purcaro", "vuolter@gmail.com")] @@ -57,15 +58,18 @@ class FilerNet(SimpleHoster): for _i in xrange(5): challenge, response = recaptcha.challenge() - header = self.load(self.pyfile.url, - post={'recaptcha_challenge_field': challenge, - 'recaptcha_response_field' : response, - 'hash' : inputs['hash']}) + #@NOTE: Work-around for v0.4.9 just_header issue + #@TODO: Check for v0.4.10 + self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) + self.load(self.pyfile.url, post={'recaptcha_challenge_field': challenge, + 'recaptcha_response_field' : response, + 'hash' : inputs['hash']})) + self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1) - if 'location' in header and header['location']: + if 'location' in self.req.http.header.lower(): + self.link = re.search(r'location: (\S+)', self.req.http.header, re.I).group(1) self.correctCaptcha() - self.link = header['location'] - return + break else: self.invalidCaptcha() -- cgit v1.2.3 From aab32f731e0b5c996004312ee8862fe30cbd6b89 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Dec 2014 02:40:59 +0100 Subject: [FilerNet] Typo --- module/plugins/hoster/FilerNet.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/FilerNet.py') diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py index 5a33439d2..2a38ac470 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilerNet(SimpleHoster): __name__ = "FilerNet" __type__ = "hoster" - __version__ = "0.11" + __version__ = "0.12" __pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+' @@ -63,7 +63,7 @@ class FilerNet(SimpleHoster): self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0) self.load(self.pyfile.url, post={'recaptcha_challenge_field': challenge, 'recaptcha_response_field' : response, - 'hash' : inputs['hash']})) + 'hash' : inputs['hash']}) self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1) if 'location' in self.req.http.header.lower(): @@ -75,10 +75,8 @@ class FilerNet(SimpleHoster): def downloadLink(self, link): - if not link: - return - - self.download(urljoin("http://filer.net/", link), disposition=True) + if link and isinstance(link, basestring): + self.download(urljoin("http://filer.net/", link), disposition=True) getInfo = create_getInfo(FilerNet) -- cgit v1.2.3