summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/UploadedTo.py
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-07-23 20:22:42 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-07-23 20:22:42 +0200
commitf5535809bebc6cc343475704832c8fd8674d2d06 (patch)
treec59bc1e6d71c04f5545ea262056c0c5be1bd8910 /module/plugins/accounts/UploadedTo.py
parentFixed PEP 8 violations in Hosters (diff)
downloadpyload-f5535809bebc6cc343475704832c8fd8674d2d06.tar.xz
Fixed PEP 8 violations in Accounts
Diffstat (limited to 'module/plugins/accounts/UploadedTo.py')
-rw-r--r--module/plugins/accounts/UploadedTo.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py
index d202018f2..ac1f3fd35 100644
--- a/module/plugins/accounts/UploadedTo.py
+++ b/module/plugins/accounts/UploadedTo.py
@@ -17,10 +17,12 @@
@author: mkaay
"""
-from module.plugins.Account import Account
import re
from time import time
+from module.plugins.Account import Account
+
+
class UploadedTo(Account):
__name__ = "UploadedTo"
__version__ = "0.26"
@@ -28,7 +30,7 @@ class UploadedTo(Account):
__description__ = """ul.net account plugin"""
__author_name__ = ("mkaay")
__author_mail__ = ("mkaay@mkaay.de")
-
+
def loadAccountInfo(self, user, req):
req.load("http://uploaded.net/language/en")
@@ -48,18 +50,19 @@ class UploadedTo(Account):
raw_valid = re.findall(r"(\d+) (Week|weeks|days|day|hours|hour)", raw_valid)
validuntil = time()
for n, u in raw_valid:
- validuntil += 3600 * int(n) * {"Week": 168, "weeks": 168, "days": 24, "day": 24, "hours": 1, "hour": 1}[u]
+ validuntil += 3600 * int(n) * {"Week": 168, "weeks": 168, "days": 24,
+ "day": 24, "hours": 1, "hour": 1}[u]
- return {"validuntil":validuntil, "trafficleft":traffic, "maxtraffic":50*1024*1024}
+ return {"validuntil": validuntil, "trafficleft": traffic, "maxtraffic": 50 * 1024 * 1024}
else:
- return {"premium" : False, "validuntil" : -1}
+ return {"premium": False, "validuntil": -1}
def login(self, user, data, req):
req.load("http://uploaded.net/language/en")
req.cj.setCookie("uploaded.net", "lang", "en")
-
- page = req.load("http://uploaded.net/io/login", post={ "id" : user, "pw" : data["password"], "_" : ""})
+
+ page = req.load("http://uploaded.net/io/login", post={"id": user, "pw": data["password"], "_": ""})
if "User and password do not match!" in page:
self.wrongPassword()