summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/EasybytezCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-07 13:15:27 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-07 13:15:27 +0200
commitd4fd843a596cb822c89b9241fb2627330157e962 (patch)
treea224e9edc173931d082df1303a174b4da0991996 /module/plugins/accounts/EasybytezCom.py
parent[TusfilesNet] Now XFSPAccount plugin based (diff)
downloadpyload-d4fd843a596cb822c89b9241fb2627330157e962.tar.xz
[EasybytezCom] Now XFSPAccount plugin based
Diffstat (limited to 'module/plugins/accounts/EasybytezCom.py')
-rw-r--r--module/plugins/accounts/EasybytezCom.py27
1 files changed, 7 insertions, 20 deletions
diff --git a/module/plugins/accounts/EasybytezCom.py b/module/plugins/accounts/EasybytezCom.py
index 564549521..969c8b393 100644
--- a/module/plugins/accounts/EasybytezCom.py
+++ b/module/plugins/accounts/EasybytezCom.py
@@ -1,28 +1,28 @@
# -*- coding: utf-8 -*-
import re
+
from time import mktime, strptime, gmtime
-from module.plugins.Account import Account
-from module.plugins.internal.SimpleHoster import parseHtmlForm
+from module.plugins.internal.XFSPAccount import XFSPAccount
from module.utils import parseFileSize
-class EasybytezCom(Account):
+class EasybytezCom(XFSPAccount):
__name__ = "EasybytezCom"
__type__ = "account"
- __version__ = "0.06"
+ __version__ = "0.07"
__description__ = """EasyBytez.com account plugin"""
__author_name__ = ("zoidberg", "guidobelix")
__author_mail__ = ("zoidberg@mujmail.cz", "guidobelix@hotmail.it")
- VALID_UNTIL_PATTERN = r'Premium account expire:</TD><TD><b>([^<]+)</b>'
- TRAFFIC_LEFT_PATTERN = r'<TR><TD>Traffic available today:</TD><TD><b>(?P<S>[^<]+)</b>'
+
+ HOSTER_URL = "http://www.easybytez.com/"
def loadAccountInfo(self, user, req):
- html = req.load("http://www.easybytez.com/?op=my_account", decode=True)
+ html = req.load(self.HOSTER_URL, get={'op': "my_account"}, decode=True)
validuntil = None
trafficleft = None
@@ -54,16 +54,3 @@ class EasybytezCom(Account):
trafficleft = parseFileSize(trafficleft) / 1024
return {"validuntil": validuntil, "trafficleft": trafficleft, "premium": premium}
-
-
- def login(self, user, data, req):
- html = req.load('http://www.easybytez.com/login.html', decode=True)
- action, inputs = parseHtmlForm('name="FL"', html)
- inputs.update({"login": user,
- "password": data['password'],
- "redirect": "http://www.easybytez.com/"})
-
- html = req.load(action, post=inputs, decode=True)
-
- if 'Incorrect Login or Password' in html or '>Error<' in html:
- self.wrongPassword()