From c59aa4057608cd47084c66e41f363b5f981f2816 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 8 Oct 2015 12:24:34 +0200 Subject: Fixpack (5) --- module/plugins/hoster/FilerNet.py | 20 +++++++------------- 1 file changed, 7 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 37c88dec7..db998f06d 100644 --- a/module/plugins/hoster/FilerNet.py +++ b/module/plugins/hoster/FilerNet.py @@ -48,19 +48,13 @@ class FilerNet(SimpleHoster): recaptcha = ReCaptcha(self) response, challenge = recaptcha.challenge() - #@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(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 self.req.http.header.lower(): - self.captcha.correct() - self.link = re.search(r'location: (\S+)', self.req.http.header, re.I).group(1) - else: - self.retry_captcha() + header = self.load(pyfile.url, + post={'recaptcha_challenge_field': challenge, + 'recaptcha_response_field' : response, + 'hash' : inputs['hash']}, + just_header=True) + + self.link = header.get('location') getInfo = create_getInfo(FilerNet) -- cgit v1.2.3