diff options
author | zoidberg10 <zoidberg@mujmail.cz> | 2012-02-01 01:23:05 +0100 |
---|---|---|
committer | zoidberg10 <zoidberg@mujmail.cz> | 2012-02-01 01:23:05 +0100 |
commit | 505c5c7c90569e060fe464c50a8fb47624064865 (patch) | |
tree | d4d8d9ebce3fe92f7bb93bb09159d0a43ec30725 /module/plugins/accounts/UlozTo.py | |
parent | re-enable & refactor fileserve/filejungle/uploadstation (diff) | |
download | pyload-505c5c7c90569e060fe464c50a8fb47624064865.tar.xz |
update uloz.to
Diffstat (limited to 'module/plugins/accounts/UlozTo.py')
-rw-r--r-- | module/plugins/accounts/UlozTo.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/module/plugins/accounts/UlozTo.py b/module/plugins/accounts/UlozTo.py index 36e1ae342..0375337b0 100644 --- a/module/plugins/accounts/UlozTo.py +++ b/module/plugins/accounts/UlozTo.py @@ -5,16 +5,16 @@ import re class UlozTo(Account): __name__ = "UlozTo" - __version__ = "0.01" + __version__ = "0.02" __type__ = "account" __description__ = """uloz.to account plugin""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - TRAFFIC_LEFT_PATTERN = r'<li class="credit"><a href="/kredit/" class="coins" title="[^"]* GB = ([^"]+) MB">' + TRAFFIC_LEFT_PATTERN = r'<li class="menu-kredit"><a href="/kredit/" title="[^"]*?GB = ([0-9.]+) MB">' def loadAccountInfo(self, user, req): - html = req.load("http://www.uloz.to/statistiky/", decode = True) + html = req.load("http://www.ulozto.net/statistiky", decode = True) found = re.search(self.TRAFFIC_LEFT_PATTERN, html) trafficleft = int(float(found.group(1).replace(' ','').replace(',','.')) * 1000 / 1.024) if found else 0 @@ -23,10 +23,9 @@ class UlozTo(Account): return {"validuntil": -1, "trafficleft": trafficleft} def login(self, user, data, req): - html = req.load('http://www.uloz.to/?do=authForm-submit', post = { - "login": "Přihlásit", + html = req.load('http://www.ulozto.net/login?do=loginForm-submit', post = { + "login": "Submit", "password": data['password'], - "trvale": "on", "username": user }, decode = True) |