summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/FshareVn.py
diff options
context:
space:
mode:
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)