diff options
Diffstat (limited to 'pyload/plugins/accounts/UlozTo.py')
-rw-r--r-- | pyload/plugins/accounts/UlozTo.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pyload/plugins/accounts/UlozTo.py b/pyload/plugins/accounts/UlozTo.py index 8a281389e..429a32db3 100644 --- a/pyload/plugins/accounts/UlozTo.py +++ b/pyload/plugins/accounts/UlozTo.py @@ -7,13 +7,13 @@ from module.plugins.Account import Account class UlozTo(Account): __name__ = "UlozTo" - __version__ = "0.05" + __version__ = "0.06" __type__ = "account" __description__ = """uloz.to account plugin""" __author_name__ = ("zoidberg", "pulpe") __author_mail__ = ("zoidberg@mujmail.cz") - TRAFFIC_LEFT_PATTERN = r'<li class="menu-kredit"><a href="http://www.ulozto.net/kredit" title="[^"]*?GB = ([0-9.]+) MB"' + TRAFFIC_LEFT_PATTERN = r'<li class="menu-kredit"><a href="/kredit" title="[^"]*?GB = ([0-9.]+) MB"' def loadAccountInfo(self, user, req): #this cookie gets lost somehow after each request @@ -22,7 +22,7 @@ class UlozTo(Account): req.cj.setCookie("www.ulozto.net", "ULOSESSID", self.phpsessid) found = re.search(self.TRAFFIC_LEFT_PATTERN, html) - trafficleft = int(float(found.group(1).replace(' ', '').replace(',', '.')) * 1000 / 1.024) if found else 0 + trafficleft = int(float(found.group(1).replace(' ', '').replace(',', '.')) * 1000 * 1.048) if found else 0 self.premium = True if trafficleft else False return {"validuntil": -1, "trafficleft": trafficleft} @@ -31,7 +31,7 @@ class UlozTo(Account): login_page = req.load('http://www.ulozto.net/?do=web-login', decode=True) action = re.findall('<form action="(.+?)"', login_page)[1].replace('&', '&') token = re.search('_token_" value="(.+?)"', login_page).group(1) - + html = req.load('http://www.ulozto.net'+action, post={ "_token_": token, "login": "Submit", |