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(-) 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