From 4a81799278ae003bfbd7897f7bcd1ef46642d953 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 (cherry picked from commit f5535809bebc6cc343475704832c8fd8674d2d06) Conflicts: pyload/plugins/accounts/AlldebridCom.py pyload/plugins/accounts/Premium4Me.py pyload/plugins/accounts/PremiumizeMe.py pyload/plugins/accounts/RealdebridCom.py --- pyload/plugins/accounts/UploadingCom.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'pyload/plugins/accounts/UploadingCom.py') diff --git a/pyload/plugins/accounts/UploadingCom.py b/pyload/plugins/accounts/UploadingCom.py index 507e4ab18..d13df4f9d 100644 --- a/pyload/plugins/accounts/UploadingCom.py +++ b/pyload/plugins/accounts/UploadingCom.py @@ -17,10 +17,12 @@ @author: mkaay """ -from module.plugins.Account import Account from time import time, strptime, mktime import re +from module.plugins.Account import Account + + class UploadingCom(Account): __name__ = "UploadingCom" __version__ = "0.1" @@ -28,25 +30,26 @@ class UploadingCom(Account): __description__ = """uploading.com account plugin""" __author_name__ = ("mkaay") __author_mail__ = ("mkaay@mkaay.de") - + def loadAccountInfo(self, user, req): src = req.load("http://uploading.com/") premium = True if "UPGRADE TO PREMIUM" in src: return {"validuntil": -1, "trafficleft": -1, "premium": False} - + m = re.search("Valid Until:(.*?)<", src) if m: validuntil = int(mktime(strptime(m.group(1).strip(), "%b %d, %Y"))) else: validuntil = -1 - + return {"validuntil": validuntil, "trafficleft": -1, "premium": True} - + def login(self, user, data, req): req.cj.setCookie("uploading.com", "lang", "1") req.cj.setCookie("uploading.com", "language", "1") req.cj.setCookie("uploading.com", "setlang", "en") req.cj.setCookie("uploading.com", "_lang", "en") req.load("http://uploading.com/") - req.load("http://uploading.com/general/login_form/?JsHttpRequest=%s-xml" % long(time()*1000), post={"email": user, "password": data["password"], "remember": "on"}) + req.load("http://uploading.com/general/login_form/?JsHttpRequest=%s-xml" % long(time() * 1000), + post={"email": user, "password": data["password"], "remember": "on"}) -- cgit v1.2.3