summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/FilerNet.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/FilerNet.py')
-rw-r--r--module/plugins/hoster/FilerNet.py20
1 files changed, 7 insertions, 13 deletions
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)