summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-02 02:50:49 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-02 02:50:49 +0100
commit1eca209b85eb714fb112c9f65916fa383d206578 (patch)
tree266fcaa64c221fc5b84712b625f43b798cf7e3d4 /module/plugins/crypter
parent[MultishareCz] Parse download content-disposition (diff)
downloadpyload-1eca209b85eb714fb112c9f65916fa383d206578.tar.xz
[RelinkUs] Improve unlockPasswordProtection
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r--module/plugins/crypter/RelinkUs.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py
index 5933839ec..5a3eca803 100644
--- a/module/plugins/crypter/RelinkUs.py
+++ b/module/plugins/crypter/RelinkUs.py
@@ -56,9 +56,8 @@ class RelinkUs(Crypter):
def setup(self):
- self.fileid = None
+ self.fileid = None
self.package = None
- self.password = None
self.captcha = False
@@ -102,7 +101,6 @@ class RelinkUs(Crypter):
def initPackage(self, pyfile):
self.fileid = re.match(self.__pattern__, pyfile.url).group('ID')
self.package = pyfile.package()
- self.password = self.getPassword()
def requestPackage(self):
@@ -130,10 +128,14 @@ class RelinkUs(Crypter):
def unlockPasswordProtection(self):
- self.logDebug("Submitting password [%s] for protected links" % self.password)
- passwd_url = self.PASSWORD_SUBMIT_URL + "?id=%s" % self.fileid
- passwd_data = {'id': self.fileid, 'password': self.password, 'pw': 'submit'}
- self.html = self.load(passwd_url, post=passwd_data, decode=True)
+ password = self.getPassword()
+
+ self.logDebug("Submitting password [%s] for protected links" % password)
+
+ if password:
+ passwd_url = self.PASSWORD_SUBMIT_URL + "?id=%s" % self.fileid
+ passwd_data = {'id': self.fileid, 'password': password, 'pw': 'submit'}
+ self.html = self.load(passwd_url, post=passwd_data, decode=True)
def unlockCaptchaProtection(self):