summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/FshareVn.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-20 14:24:13 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-12-20 14:24:13 +0100
commit6325eda4e8c142edd11c747f7a9d4a3fa975c494 (patch)
tree589819bb5e5ce441ea8f1109c8357c086816ed69 /module/plugins/hoster/FshareVn.py
parent[AlldebridCom] Syntax fixup (diff)
downloadpyload-6325eda4e8c142edd11c747f7a9d4a3fa975c494.tar.xz
Fix password retrieving in some plugins
Diffstat (limited to 'module/plugins/hoster/FshareVn.py')
-rw-r--r--module/plugins/hoster/FshareVn.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py
index 3c230bbe2..7b8e4b0bd 100644
--- a/module/plugins/hoster/FshareVn.py
+++ b/module/plugins/hoster/FshareVn.py
@@ -24,7 +24,7 @@ def doubleDecode(m):
class FshareVn(SimpleHoster):
__name__ = "FshareVn"
__type__ = "hoster"
- __version__ = "0.17"
+ __version__ = "0.18"
__pattern__ = r'http://(?:www\.)?fshare\.vn/file/.*'
@@ -66,15 +66,20 @@ class FshareVn(SimpleHoster):
if not inputs:
self.error(_("No FORM"))
+
elif 'link_file_pwd_dl' in inputs:
- for password in self.getPassword().splitlines():
+ password = self.getPassword()
+
+ if password:
self.logInfo(_("Password protected link, trying ") + password)
inputs['link_file_pwd_dl'] = password
self.html = self.load(self.url, post=inputs, decode=True)
- if not 'name="link_file_pwd_dl"' in self.html:
- break
+
+ if 'name="link_file_pwd_dl"' in self.html:
+ self.fail(_("Incorrect password"))
else:
- self.fail(_("No or incorrect password"))
+ self.fail(_("No password found"))
+
else:
self.html = self.load(self.url, post=inputs, decode=True)