summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/MediafireCom.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/MediafireCom.py
parent[AlldebridCom] Syntax fixup (diff)
downloadpyload-6325eda4e8c142edd11c747f7a9d4a3fa975c494.tar.xz
Fix password retrieving in some plugins
Diffstat (limited to 'module/plugins/hoster/MediafireCom.py')
-rw-r--r--module/plugins/hoster/MediafireCom.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py
index cdfa410a9..4b420242d 100644
--- a/module/plugins/hoster/MediafireCom.py
+++ b/module/plugins/hoster/MediafireCom.py
@@ -49,7 +49,7 @@ def getInfo(urls):
class MediafireCom(SimpleHoster):
__name__ = "MediafireCom"
__type__ = "hoster"
- __version__ = "0.80"
+ __version__ = "0.81"
__pattern__ = r'http://(?:www\.)?mediafire\.com/(file/|(view/?|download\.php)?\?)(\w{11}|\w{15})($|/)'
@@ -98,14 +98,17 @@ class MediafireCom(SimpleHoster):
def handleFree(self):
- passwords = self.getPassword().splitlines()
- while self.PASSWORD_PATTERN in self.html:
- if len(passwords):
- password = passwords.pop(0)
+ if self.PASSWORD_PATTERN in self.html:
+ password = self.getPassword()
+
+ if password:
self.logInfo(_("Password protected link, trying ") + password)
self.html = self.load(self.url, post={"downloadp": password})
+
+ if self.PASSWORD_PATTERN in self.html:
+ self.fail(_("Incorrect password"))
else:
- self.fail(_("No or incorrect password"))
+ self.fail(_("No password found"))
m = re.search(r'kNO = r"(http://.*?)";', self.html)
if m is None: