diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-12 13:13:20 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-12 13:13:20 +0200 |
commit | 6a86b735fb9723239f4d109e2a2985b7782807dc (patch) | |
tree | eca7ced4fb3dd300611fc831c0eccb9a5536a64c /module/plugins/accounts/X7To.py | |
parent | comment out filemanager (diff) | |
download | pyload-6a86b735fb9723239f4d109e2a2985b7782807dc.tar.xz |
erniebs fixes, ul lifetime fix
Diffstat (limited to 'module/plugins/accounts/X7To.py')
-rw-r--r-- | module/plugins/accounts/X7To.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/module/plugins/accounts/X7To.py b/module/plugins/accounts/X7To.py index abfb13e5e..8c2bf245a 100644 --- a/module/plugins/accounts/X7To.py +++ b/module/plugins/accounts/X7To.py @@ -33,8 +33,17 @@ class X7To(Account): def loadAccountInfo(self, user, req):
page = req.load("http://www.x7.to/my")
- valid = re.search("Premium-Mitglied bis ([0-9]*-[0-9]*-[0-9]*)", page, re.IGNORECASE).group(1)
- valid = int(mktime(strptime(valid, "%Y-%m-%d")))
+ validCheck = re.search("Premium-Mitglied bis ([0-9]*-[0-9]*-[0-9]*)", page, re.IGNORECASE)
+ if validCheck:
+ valid = validCheck.group(1)
+ valid = int(mktime(strptime(valid, "%Y-%m-%d")))
+ else:
+ validCheck = re.search("Premium member until ([0-9]*-[0-9]*-[0-9]*)", page, re.IGNORECASE)
+ if validCheck:
+ valid = validCheck.group(1)
+ valid = int(mktime(strptime(valid, "%Y-%m-%d")))
+ else:
+ valid = 0
trafficleft = re.search(r'<em style="white-space:nowrap">([\d]*[,]?[\d]?[\d]?) (KB|MB|GB)</em>', page, re.IGNORECASE)
if trafficleft:
|