summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster/FilepostCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-10 16:54:05 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-10 16:54:05 +0100
commit3b64c8c07f2a331db66e6af6b5f617e6630d7b44 (patch)
tree0b071af35a7677f36895ec1dd8333f4ef56c79d8 /pyload/plugins/hoster/FilepostCom.py
parentLicense cleanup (diff)
parent[CaptchaService] New service AdYouLike + AdsCaptcha detect_key fixup (diff)
downloadpyload-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/FilepostCom.py')
-rw-r--r--pyload/plugins/hoster/FilepostCom.py37
1 files changed, 20 insertions, 17 deletions
diff --git a/pyload/plugins/hoster/FilepostCom.py b/pyload/plugins/hoster/FilepostCom.py
index 2948f3bc6..e80ec56bc 100644
--- a/pyload/plugins/hoster/FilepostCom.py
+++ b/pyload/plugins/hoster/FilepostCom.py
@@ -92,36 +92,39 @@ class FilepostCom(SimpleHoster):
def getJsonResponse(self, get_dict, post_dict, field):
- json_response = json_loads(self.load('https://filepost.com/files/get/', get=get_dict, post=post_dict))
- self.logDebug(json_response)
+ res = json_loads(self.load('https://filepost.com/files/get/', get=get_dict, post=post_dict))
- if not 'js' in json_response:
+ self.logDebug(res)
+
+ if not 'js' in res:
self.error(_("JSON %s 1") % field)
- # i changed js_answer to json_response['js'] since js_answer is nowhere set.
+ # i changed js_answer to res['js'] since js_answer is nowhere set.
# i don't know the JSON-HTTP specs in detail, but the previous author
- # accessed json_response['js']['error'] as well as js_answer['error'].
+ # accessed res['js']['error'] as well as js_answer['error'].
# see the two lines commented out with "# ~?".
- if 'error' in json_response['js']:
- if json_response['js']['error'] == 'download_delay':
- self.retry(wait_time=json_response['js']['params']['next_download'])
+ if 'error' in res['js']:
+
+ if res['js']['error'] == 'download_delay':
+ self.retry(wait_time=res['js']['params']['next_download'])
# ~? self.retry(wait_time=js_answer['params']['next_download'])
- elif 'Wrong file password' in json_response['js']['error']:
- return None
- elif 'You entered a wrong CAPTCHA code' in json_response['js']['error']:
- return None
- elif 'CAPTCHA Code nicht korrekt' in json_response['js']['error']:
+
+ elif ('Wrong file password' in res['js']['error']
+ or 'You entered a wrong CAPTCHA code' in res['js']['error']
+ or 'CAPTCHA Code nicht korrekt' in res['js']['error']):
return None
- elif 'CAPTCHA' in json_response['js']['error']:
+
+ elif 'CAPTCHA' in res['js']['error']:
self.logDebug("Error response is unknown, but mentions CAPTCHA")
return None
+
else:
- self.fail(json_response['js']['error'])
+ self.fail(res['js']['error'])
- if not 'answer' in json_response['js'] or not field in json_response['js']['answer']:
+ if not 'answer' in res['js'] or not field in res['js']['answer']:
self.error(_("JSON %s 2") % field)
- return json_response['js']['answer'][field]
+ return res['js']['answer'][field]
getInfo = create_getInfo(FilepostCom)