diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-01-02 02:50:49 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-01-02 02:50:49 +0100 |
commit | 1eca209b85eb714fb112c9f65916fa383d206578 (patch) | |
tree | 266fcaa64c221fc5b84712b625f43b798cf7e3d4 /module/plugins/crypter | |
parent | [MultishareCz] Parse download content-disposition (diff) | |
download | pyload-1eca209b85eb714fb112c9f65916fa383d206578.tar.xz |
[RelinkUs] Improve unlockPasswordProtection
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r-- | module/plugins/crypter/RelinkUs.py | 16 |
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): |