From f5535809bebc6cc343475704832c8fd8674d2d06 Mon Sep 17 00:00:00 2001 From: Stefano Date: Tue, 23 Jul 2013 20:22:42 +0200 Subject: Fixed PEP 8 violations in Accounts --- module/plugins/accounts/HellspyCz.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'module/plugins/accounts/HellspyCz.py') diff --git a/module/plugins/accounts/HellspyCz.py b/module/plugins/accounts/HellspyCz.py index 5f14a093e..1bb574731 100644 --- a/module/plugins/accounts/HellspyCz.py +++ b/module/plugins/accounts/HellspyCz.py @@ -17,9 +17,10 @@ @author: zoidberg """ -from module.plugins.Account import Account import re -import string + +from module.plugins.Account import Account + class HellspyCz(Account): __name__ = "HellspyCz" @@ -48,23 +49,25 @@ class HellspyCz(Account): return {"validuntil": -1, "trafficleft": credits} - def login(self, user, data,req): - header = req.load('http://www.hellspy.com/', just_header = True) - self.phpsessid = re.search(r'PHPSESSID=(\w+)', header).group(1) + def login(self, user, data, req): + header = req.load('http://www.hellspy.com/', just_header=True) + self.phpsessid = re.search(r'PHPSESSID=(\w+)', header).group(1) self.logDebug("PHPSESSID:" + self.phpsessid) - + html = req.load("http://www.hellspy.com/--%s-" % self.phpsessid) - html = req.load("http://www.hell-share.com/user/login/?do=apiLoginForm-submit&api_hash=hellspy_iq&user_hash=%s" % self.phpsessid, post={ + html = req.load( + "http://www.hell-share.com/user/login/?do=apiLoginForm-submit&api_hash=hellspy_iq&user_hash=%s" % self.phpsessid, + post={ "login": "1", "password": data["password"], "username": user, - "redir_url": 'http://www.hellspy.com/?do=loginBox-login', + "redir_url": 'http://www.hellspy.com/?do=loginBox-login', "permanent_login": "1" - }) + }) cj = self.getAccountCookies(user) cj.setCookie(".hellspy.com", "PHPSESSID", self.phpsessid) if not re.search(self.CREDIT_LEFT_PATTERN, html): - self.wrongPassword() \ No newline at end of file + self.wrongPassword() -- cgit v1.2.3