summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/accounts/EuroshareEu.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/accounts/EuroshareEu.py')
-rw-r--r--pyload/plugins/accounts/EuroshareEu.py25
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()