diff options
author | radek-senfeld <rush@logic.cz> | 2014-03-29 22:37:01 +0100 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2014-03-29 22:37:01 +0100 |
commit | a80bf6d4edc8ba13d1383d9502e994be10a9d375 (patch) | |
tree | b5f25af4b1062125ad96eeb03db0ac0df12975c4 /module/plugins/accounts | |
parent | Merge pull request #488 from vuolter/s/crypter/MultiupOrg (diff) | |
download | pyload-a80bf6d4edc8ba13d1383d9502e994be10a9d375.tar.xz |
Fixed UlozTo hoster and account
Merged #554
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/UlozTo.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/plugins/accounts/UlozTo.py b/module/plugins/accounts/UlozTo.py index 8a281389e..429a32db3 100644 --- a/module/plugins/accounts/UlozTo.py +++ b/module/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", |