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:40:59 +0200 |
commit | 4a81799278ae003bfbd7897f7bcd1ef46642d953 (patch) | |
tree | 59e580fc761103cfacd9190bc9c55a5a01367f47 /pyload/plugins/accounts/EuroshareEu.py | |
parent | little cleanup, added some tests (diff) | |
download | pyload-4a81799278ae003bfbd7897f7bcd1ef46642d953.tar.xz |
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
Diffstat (limited to 'pyload/plugins/accounts/EuroshareEu.py')
-rw-r--r-- | pyload/plugins/accounts/EuroshareEu.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/pyload/plugins/accounts/EuroshareEu.py b/pyload/plugins/accounts/EuroshareEu.py index 42967d975..830c1db3f 100644 --- a/pyload/plugins/accounts/EuroshareEu.py +++ b/pyload/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() |