summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2011-06-10 13:09:33 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2011-06-10 13:09:33 +0200
commita40cf88920e94490d5c851fb273b8d2f48aef6fb (patch)
tree8de448bbf50535901a35a26c2a145403ed166107 /module/plugins/accounts
parenternieb's rapidshare patch (diff)
downloadpyload-a40cf88920e94490d5c851fb273b8d2f48aef6fb.tar.xz
ernieb's hoster patches
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/X7To.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/module/plugins/accounts/X7To.py b/module/plugins/accounts/X7To.py
index 1e3ef782e..abfb13e5e 100644
--- a/module/plugins/accounts/X7To.py
+++ b/module/plugins/accounts/X7To.py
@@ -36,10 +36,9 @@ class X7To(Account):
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")))
- trafficleft = re.search('<em style="white-space:nowrap">([\d]*)[,]?[\d]?[\d]? (KB|MB|GB)</em>', page,
- re.IGNORECASE)
+ trafficleft = re.search(r'<em style="white-space:nowrap">([\d]*[,]?[\d]?[\d]?) (KB|MB|GB)</em>', page, re.IGNORECASE)
if trafficleft:
- units = float(trafficleft.group(1))
+ units = float(trafficleft.group(1).replace(",", "."))
pow = {'KB': 0, 'MB': 1, 'GB': 2}[trafficleft.group(2)]
trafficleft = int(units * 1024 ** pow)
else:
@@ -55,4 +54,4 @@ class X7To(Account):
{"redirect": "http://www.x7.to/", "id": user, "pw": data['password'], "submit": "submit"})
if "Username and password are not matching." in page:
- self.wrongPassword() \ No newline at end of file
+ self.wrongPassword()