diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-20 14:24:13 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-20 14:24:13 +0100 |
commit | 6325eda4e8c142edd11c747f7a9d4a3fa975c494 (patch) | |
tree | 589819bb5e5ce441ea8f1109c8357c086816ed69 /module/plugins/hoster/FilepostCom.py | |
parent | [AlldebridCom] Syntax fixup (diff) | |
download | pyload-6325eda4e8c142edd11c747f7a9d4a3fa975c494.tar.xz |
Fix password retrieving in some plugins
Diffstat (limited to 'module/plugins/hoster/FilepostCom.py')
-rw-r--r-- | module/plugins/hoster/FilepostCom.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py index b94892ef4..66c040770 100644 --- a/module/plugins/hoster/FilepostCom.py +++ b/module/plugins/hoster/FilepostCom.py @@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class FilepostCom(SimpleHoster): __name__ = "FilepostCom" __type__ = "hoster" - __version__ = "0.30" + __version__ = "0.31" __pattern__ = r'https?://(?:www\.)?(?:filepost\.com/files|fp\.io)/(?P<ID>[^/]+)' @@ -52,17 +52,20 @@ class FilepostCom(SimpleHoster): if 'var is_pass_exists = true;' in self.html: # Solve password - for file_pass in self.getPassword().splitlines(): + password = self.getPassword() + + if password: + self.logInfo(_("Password protected link, trying ") + file_pass) + get_dict['JsHttpRequest'] = str(int(time() * 10000)) + '-xml' post_dict['file_pass'] = file_pass - self.logInfo(_("Password protected link, trying ") + file_pass) - download_url = self.getJsonResponse(get_dict, post_dict, 'link') - if download_url: - break + self.link = self.getJsonResponse(get_dict, post_dict, 'link') + if not self.link: + self.fail(_("Incorrect password")) else: - self.fail(_("No or incorrect password")) + self.fail(_("No password found")) else: # Solve recaptcha |