diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-10 16:54:05 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-10 16:54:05 +0100 |
commit | 3b64c8c07f2a331db66e6af6b5f617e6630d7b44 (patch) | |
tree | 0b071af35a7677f36895ec1dd8333f4ef56c79d8 /pyload/plugins/hoster/IfileIt.py | |
parent | License cleanup (diff) | |
parent | [CaptchaService] New service AdYouLike + AdsCaptcha detect_key fixup (diff) | |
download | pyload-3b64c8c07f2a331db66e6af6b5f617e6630d7b44.tar.xz |
Merge branch 'stable' into 0.4.10
Conflicts:
module/plugins/hooks/ClickAndLoad.py
module/plugins/internal/CaptchaService.py
pyload/plugins/addon/Checksum.py
pyload/plugins/addon/DownloadScheduler.py
pyload/plugins/addon/ExternalScripts.py
pyload/plugins/addon/ExtractArchive.py
pyload/plugins/addon/IRCInterface.py
pyload/plugins/addon/MergeFiles.py
pyload/plugins/addon/MultiHome.py
pyload/plugins/addon/SkipRev.py
pyload/plugins/addon/UnSkipOnFail.py
pyload/plugins/addon/WindowsPhoneToastNotify.py
pyload/plugins/container/CCF.py
pyload/plugins/hook/BypassCaptcha.py
pyload/plugins/hook/Captcha9kw.py
pyload/plugins/hook/CaptchaBrotherhood.py
pyload/plugins/hook/DeathByCaptcha.py
pyload/plugins/hook/ExpertDecoders.py
pyload/plugins/hook/ImageTyperz.py
pyload/plugins/hoster/DlFreeFr.py
pyload/plugins/internal/OCR.py
Diffstat (limited to 'pyload/plugins/hoster/IfileIt.py')
-rw-r--r-- | pyload/plugins/hoster/IfileIt.py | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/pyload/plugins/hoster/IfileIt.py b/pyload/plugins/hoster/IfileIt.py index b96734159..884bf8582 100644 --- a/pyload/plugins/hoster/IfileIt.py +++ b/pyload/plugins/hoster/IfileIt.py @@ -27,27 +27,30 @@ class IfileIt(SimpleHoster): def handleFree(self): - ukey = re.match(self.__pattern__, self.pyfile.url).group(1) - json_url = 'http://ifile.it/new_download-request.json' + ukey = re.match(self.__pattern__, self.pyfile.url).group(1) + json_url = 'http://ifile.it/new_download-request.json' post_data = {"ukey": ukey, "ab": "0"} + res = json_loads(self.load(json_url, post=post_data)) - json_response = json_loads(self.load(json_url, post=post_data)) - self.logDebug(json_response) - if json_response['status'] == 3: + self.logDebug(res) + + if res['status'] == 3: self.offline() - if json_response['captcha']: + if res['captcha']: captcha_key = re.search(self.RECAPTCHA_PATTERN, self.html).group(1) recaptcha = ReCaptcha(self) post_data['ctype'] = "recaptcha" for _i in xrange(5): - post_data['recaptcha_challenge'], post_data['recaptcha_response'] = recaptcha.challenge(captcha_key) - json_response = json_loads(self.load(json_url, post=post_data)) - self.logDebug(json_response) + challenge, response = recaptcha.challenge(captcha_key) + post_data.update({'recaptcha_challenge': challenge, + 'recaptcha_response' : response}) + res = json_loads(self.load(json_url, post=post_data)) + self.logDebug(res) - if json_response['retry']: + if res['retry']: self.invalidCaptcha() else: self.correctCaptcha() @@ -55,10 +58,10 @@ class IfileIt(SimpleHoster): else: self.fail(_("Incorrect captcha")) - if not "ticket_url" in json_response: + if not "ticket_url" in res: self.error(_("No download URL")) - self.download(json_response['ticket_url']) + self.download(res['ticket_url']) getInfo = create_getInfo(IfileIt) |