summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/X7To.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/X7To.py
parentFixed PEP 8 violations in Hosters (diff)
downloadpyload-f5535809bebc6cc343475704832c8fd8674d2d06.tar.xz
Fixed PEP 8 violations in Accounts
Diffstat (limited to 'module/plugins/accounts/X7To.py')
-rw-r--r--module/plugins/accounts/X7To.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/plugins/accounts/X7To.py b/module/plugins/accounts/X7To.py
index 90f65d55e..34a7b99be 100644
--- a/module/plugins/accounts/X7To.py
+++ b/module/plugins/accounts/X7To.py
@@ -22,6 +22,7 @@ from time import strptime, mktime
from module.plugins.Account import Account
+
class X7To(Account):
__name__ = "X7To"
__version__ = "0.1"
@@ -45,7 +46,8 @@ class X7To(Account):
else:
valid = 0
- trafficleft = re.search(r'<em style="white-space:nowrap">([\d]*[,]?[\d]?[\d]?) (KB|MB|GB)</em>', page, re.IGNORECASE)
+ trafficleft = re.search(r'<em style="white-space:nowrap">([\d]*[,]?[\d]?[\d]?) (KB|MB|GB)</em>',
+ page, re.IGNORECASE)
if trafficleft:
units = float(trafficleft.group(1).replace(",", "."))
pow = {'KB': 0, 'MB': 1, 'GB': 2}[trafficleft.group(2)]
@@ -55,12 +57,11 @@ class X7To(Account):
return {"trafficleft": trafficleft, "validuntil": valid}
-
def login(self, user, data, req):
#req.cj.setCookie("share.cx", "lang", "english")
page = req.load("http://x7.to/lang/en", None, {})
page = req.load("http://x7.to/james/login", None,
- {"redirect": "http://www.x7.to/", "id": user, "pw": data['password'], "submit": "submit"})
+ {"redirect": "http://www.x7.to/", "id": user, "pw": data['password'], "submit": "submit"})
if "Username and password are not matching." in page:
self.wrongPassword()