diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-15 21:06:10 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-06-24 22:38:26 +0200 |
commit | 5a139055ae658d3a05cbb658cbd66aeae0d01db5 (patch) | |
tree | b283d2f470fe2a4115474959e4982a59bc686067 /module/plugins/accounts | |
parent | Merge pull request #1537 from GammaC0de/patch-1 (diff) | |
download | pyload-5a139055ae658d3a05cbb658cbd66aeae0d01db5.tar.xz |
Spare code cosmetics
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/LinksnappyCom.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/module/plugins/accounts/LinksnappyCom.py b/module/plugins/accounts/LinksnappyCom.py index 9d5202945..2b1d1aebf 100644 --- a/module/plugins/accounts/LinksnappyCom.py +++ b/module/plugins/accounts/LinksnappyCom.py @@ -10,6 +10,7 @@ class LinksnappyCom(Account): __name__ = "LinksnappyCom" __type__ = "account" __version__ = "0.06" + __description__ = """Linksnappy.com account plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] @@ -25,7 +26,7 @@ class LinksnappyCom(Account): j = json_loads(r) if j['error']: - return {"premium": False} + return {'premium': False} validuntil = j['return']['expire'] @@ -33,7 +34,7 @@ class LinksnappyCom(Account): validuntil = -1 elif validuntil == 'expired': - return {"premium": False} + return {'premium': False} else: validuntil = float(validuntil) @@ -43,15 +44,17 @@ class LinksnappyCom(Account): else: trafficleft = self.parseTraffic("%d MB" % j['return']['trafficleft']) - return {"premium": True, "validuntil": validuntil, "trafficleft": trafficleft} + return {'premium' : True , + 'validuntil' : validuntil , + 'trafficleft': trafficleft} def login(self, user, data, req): - r = req.load("https://gen.linksnappy.com/lseAPI.php", - get={'act' : 'USERDETAILS', - 'username': user, - 'password': hashlib.md5(data['password']).hexdigest()}, - decode=True) + html = req.load("https://gen.linksnappy.com/lseAPI.php", + get={'act' : 'USERDETAILS', + 'username': user, + 'password': hashlib.md5(data['password']).hexdigest()}, + decode=True) - if 'Invalid Account Details' in r: + if "Invalid Account Details" in html: self.wrongPassword() |