diff options
author | mkaay <mkaay@mkaay.de> | 2011-06-10 13:09:33 +0200 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2011-06-10 13:09:33 +0200 |
commit | a40cf88920e94490d5c851fb273b8d2f48aef6fb (patch) | |
tree | 8de448bbf50535901a35a26c2a145403ed166107 /module/plugins/accounts | |
parent | ernieb's rapidshare patch (diff) | |
download | pyload-a40cf88920e94490d5c851fb273b8d2f48aef6fb.tar.xz |
ernieb's hoster patches
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/X7To.py | 7 |
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()
|