diff options
author | Stefano <l.stickell@yahoo.it> | 2013-07-23 20:22:42 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-07-23 20:22:42 +0200 |
commit | f5535809bebc6cc343475704832c8fd8674d2d06 (patch) | |
tree | c59bc1e6d71c04f5545ea262056c0c5be1bd8910 /module/plugins/accounts/EuroshareEu.py | |
parent | Fixed PEP 8 violations in Hosters (diff) | |
download | pyload-f5535809bebc6cc343475704832c8fd8674d2d06.tar.xz |
Fixed PEP 8 violations in Accounts
Diffstat (limited to 'module/plugins/accounts/EuroshareEu.py')
-rw-r--r-- | module/plugins/accounts/EuroshareEu.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/module/plugins/accounts/EuroshareEu.py b/module/plugins/accounts/EuroshareEu.py index 42967d975..830c1db3f 100644 --- a/module/plugins/accounts/EuroshareEu.py +++ b/module/plugins/accounts/EuroshareEu.py @@ -17,11 +17,12 @@ @author: zoidberg """ -from module.plugins.Account import Account from time import mktime, strptime -from string import replace import re +from module.plugins.Account import Account + + class EuroshareEu(Account): __name__ = "EuroshareEu" __version__ = "0.01" @@ -33,23 +34,23 @@ class EuroshareEu(Account): def loadAccountInfo(self, user, req): self.relogin(user) html = req.load("http://euroshare.eu/customer-zone/settings/") - + found = re.search('id="input_expire_date" value="(\d+\.\d+\.\d+ \d+:\d+)"', html) if found is None: premium, validuntil = False, -1 else: premium = True validuntil = mktime(strptime(found.group(1), "%d.%m.%Y %H:%M")) - + return {"validuntil": validuntil, "trafficleft": -1, "premium": premium} - + def login(self, user, data, req): - + html = req.load('http://euroshare.eu/customer-zone/login/', post={ - "trvale": "1", - "login": user, - "password": data["password"] - }, decode=True) - + "trvale": "1", + "login": user, + "password": data["password"] + }, decode=True) + if u">Nesprávne prihlasovacie meno alebo heslo" in html: - self.wrongPassword()
\ No newline at end of file + self.wrongPassword() |