summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/FilepostCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/FilepostCom.py')
-rw-r--r--module/plugins/hoster/FilepostCom.py25
1 files changed, 9 insertions, 16 deletions
diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py
index f2e3fb76d..3d42bebed 100644
--- a/module/plugins/hoster/FilepostCom.py
+++ b/module/plugins/hoster/FilepostCom.py
@@ -64,27 +64,20 @@ class FilepostCom(SimpleHoster):
self.link = self.get_json_response(get_dict, post_dict, 'link')
if not self.link:
- self.fail(_("Incorrect password"))
+ self.fail(_("Wrong password"))
else:
self.fail(_("No password found"))
else:
- #: Solve recaptcha
- recaptcha = ReCaptcha(self)
-
- for i in xrange(5):
- get_dict['JsHttpRequest'] = str(int(time.time() * 10000)) + '-xml'
- if i:
- post_dict['recaptcha_response_field'], post_dict['recaptcha_challenge_field'] = recaptcha.challenge(
- captcha_key)
- self.log_debug(u"RECAPTCHA: %s : %s : %s" % (
- captcha_key, post_dict['recaptcha_challenge_field'], post_dict['recaptcha_response_field']))
+ get_dict['JsHttpRequest'] = str(int(time.time() * 10000)) + '-xml'
+ self.link = self.get_json_response(get_dict, post_dict, 'link')
+ if not self.link:
+ #: Solve recaptcha
+ recaptcha = ReCaptcha(self)
+ post_dict['recaptcha_response_field'], post_dict['recaptcha_challenge_field'] = recaptcha.challenge(captcha_key)
self.link = self.get_json_response(get_dict, post_dict, 'link')
- else:
- self.fail(_("Invalid captcha"))
-
def get_json_response(self, get_dict, post_dict, field):
res = json_loads(self.load('https://filepost.com/files/get/', get=get_dict, post=post_dict))
@@ -101,8 +94,8 @@ class FilepostCom(SimpleHoster):
if 'error' in res['js']:
if res['js']['error'] == "download_delay":
- self.retry(delay=res['js']['params']['next_download'])
- #: ~? self.retry(delay=js_answer['params']['next_download'])
+ self.retry(wait=res['js']['params']['next_download'])
+ #: ~? self.retry(wait=js_answer['params']['next_download'])
elif 'Wrong file password' in res['js']['error'] \
or 'You entered a wrong CAPTCHA code' in res['js']['error'] \