diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-07-20 02:25:53 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-07-20 03:33:00 +0200 |
commit | 9762ac2fe94e3c6709fc46b6e9bde99e10cb3681 (patch) | |
tree | 9faa53476d13cb9b17bb12fd5fcea9d8df03305b | |
parent | [UpdateManager] Rewritten removePlugins method + protect from self-removing (diff) | |
download | pyload-9762ac2fe94e3c6709fc46b6e9bde99e10cb3681.tar.xz |
[account] self.html -> html (where was possible)
-rw-r--r-- | module/plugins/accounts/FilerNet.py | 16 | ||||
-rw-r--r-- | module/plugins/accounts/FshareVn.py | 12 | ||||
-rw-r--r-- | module/plugins/accounts/MultiDebridCom.py | 6 | ||||
-rw-r--r-- | module/plugins/accounts/SimplyPremiumCom.py | 4 | ||||
-rw-r--r-- | module/plugins/accounts/UnrestrictLi.py | 4 |
5 files changed, 21 insertions, 21 deletions
diff --git a/module/plugins/accounts/FilerNet.py b/module/plugins/accounts/FilerNet.py index 475f01301..0eaa8f452 100644 --- a/module/plugins/accounts/FilerNet.py +++ b/module/plugins/accounts/FilerNet.py @@ -37,14 +37,14 @@ class FilerNet(Account): def loadAccountInfo(self, user, req): - self.html = req.load("https://filer.net/profile") + html = req.load("https://filer.net/profile") # Free user - if re.search(self.FREE_PATTERN, self.html): + if re.search(self.FREE_PATTERN, html): return {"premium": False, "validuntil": None, "trafficleft": None} - until = re.search(self.WALID_UNTIL_PATTERN, self.html) - traffic = re.search(self.TRAFFIC_PATTERN, self.html) + until = re.search(self.WALID_UNTIL_PATTERN, html) + traffic = re.search(self.TRAFFIC_PATTERN, html) if until and traffic: validuntil = int(time.mktime(time.strptime(until.group(1), "%d.%m.%Y %H:%M:%S"))) trafficleft = parseFileSize(traffic.group(1)) / 1024 @@ -54,10 +54,10 @@ class FilerNet(Account): return {"premium": False, "validuntil": None, "trafficleft": None} def login(self, user, data, req): - self.html = req.load("https://filer.net/login") - token = re.search(self.TOKEN_PATTERN, self.html).group(1) - self.html = req.load("https://filer.net/login_check", + html = req.load("https://filer.net/login") + token = re.search(self.TOKEN_PATTERN, html).group(1) + html = req.load("https://filer.net/login_check", post={"_username": user, "_password": data['password'], "_remember_me": "on", "_csrf_token": token, "_target_path": "https://filer.net/"}) - if 'Logout' not in self.html: + if 'Logout' not in html: self.wrongPassword() diff --git a/module/plugins/accounts/FshareVn.py b/module/plugins/accounts/FshareVn.py index 27b74c907..3996322ad 100644 --- a/module/plugins/accounts/FshareVn.py +++ b/module/plugins/accounts/FshareVn.py @@ -38,14 +38,14 @@ class FshareVn(Account): def loadAccountInfo(self, user, req): - self.html = req.load("http://www.fshare.vn/account_info.php", decode=True) + html = req.load("http://www.fshare.vn/account_info.php", decode=True) - if re.search(self.LIFETIME_PATTERN, self.html): + if re.search(self.LIFETIME_PATTERN, html): self.logDebug("Lifetime membership detected") trafficleft = self.getTrafficLeft() return {"validuntil": -1, "trafficleft": trafficleft, "premium": True} - found = re.search(self.VALID_UNTIL_PATTERN, self.html) + found = re.search(self.VALID_UNTIL_PATTERN, html) if found: premium = True validuntil = mktime(strptime(found.group(1), '%I:%M:%S %p %d-%m-%Y')) @@ -60,15 +60,15 @@ class FshareVn(Account): def login(self, user, data, req): req.http.c.setopt(REFERER, "https://www.fshare.vn/login.php") - self.html = req.load('https://www.fshare.vn/login.php', post={ + html = req.load('https://www.fshare.vn/login.php', post={ "login_password": data['password'], "login_useremail": user, "url_refe": "http://www.fshare.vn/index.php" }, referer=True, decode=True) - if not re.search(r'<img\s+alt="VIP"', self.html): + if not re.search(r'<img\s+alt="VIP"', html): self.wrongPassword() def getTrafficLeft(self): - found = re.search(self.TRAFFIC_LEFT_PATTERN, self.html) + found = re.search(self.TRAFFIC_LEFT_PATTERN, html) return float(found.group(1)) * 1024 ** {'k': 0, 'K': 0, 'M': 1, 'G': 2}[found.group(2)] if found else 0 diff --git a/module/plugins/accounts/MultiDebridCom.py b/module/plugins/accounts/MultiDebridCom.py index da8a2046a..405dc60ac 100644 --- a/module/plugins/accounts/MultiDebridCom.py +++ b/module/plugins/accounts/MultiDebridCom.py @@ -39,10 +39,10 @@ class MultiDebridCom(Account): def login(self, user, data, req): # Password to use is the API-Password written in http://multi-debrid.com/myaccount - self.html = req.load("http://multi-debrid.com/api.php", + html = req.load("http://multi-debrid.com/api.php", get={"user": user, "pass": data['password']}) - self.logDebug('JSON data: ' + self.html) - self.json_data = json_loads(self.html) + self.logDebug('JSON data: ' + html) + self.json_data = json_loads(html) if self.json_data['status'] != 'ok': self.logError('Invalid login. The password to use is the API-Password you find in your "My Account" page') self.wrongPassword() diff --git a/module/plugins/accounts/SimplyPremiumCom.py b/module/plugins/accounts/SimplyPremiumCom.py index 37aff09b3..6eace8838 100644 --- a/module/plugins/accounts/SimplyPremiumCom.py +++ b/module/plugins/accounts/SimplyPremiumCom.py @@ -53,7 +53,7 @@ class SimplyPremiumCom(Account): else: post_data = {"login_name": user, "login_pass": data['password']} - self.html = req.load("http://www.simply-premium.com/login.php", post=post_data) + html = req.load("http://www.simply-premium.com/login.php", post=post_data) - if 'logout' not in self.html: + if 'logout' not in html: self.wrongPassword() diff --git a/module/plugins/accounts/UnrestrictLi.py b/module/plugins/accounts/UnrestrictLi.py index ac2d2d82a..94452b966 100644 --- a/module/plugins/accounts/UnrestrictLi.py +++ b/module/plugins/accounts/UnrestrictLi.py @@ -51,7 +51,7 @@ class UnrestrictLi(Account): post_data = {"username": user, "password": data['password'], "remember_me": "remember", "signin": "Sign in"} - self.html = req.load("https://unrestrict.li/sign_in", post=post_data) + html = req.load("https://unrestrict.li/sign_in", post=post_data) - if 'sign_out' not in self.html: + if 'sign_out' not in html: self.wrongPassword() |