diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-02-26 18:49:09 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-02-26 18:49:09 +0100 |
commit | 22e07b11b82beff95e913b24ee5dcb9f5175a116 (patch) | |
tree | d58518815d54451ccb19fb4a0f339aa8c79a1cb7 | |
parent | Merge pull request #17 from kmarty/stable (diff) | |
parent | Fix paid account access (contributed by wendelin) (diff) | |
download | pyload-22e07b11b82beff95e913b24ee5dcb9f5175a116.tar.xz |
Merge pull request #18 from kmarty/stable
Fixed error getting file size
-rw-r--r-- | module/plugins/accounts/UlozTo.py | 6 | ||||
-rw-r--r-- | module/plugins/hoster/UlozTo.py | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/accounts/UlozTo.py b/module/plugins/accounts/UlozTo.py index 0c4ecda6a..232b6b64f 100644 --- a/module/plugins/accounts/UlozTo.py +++ b/module/plugins/accounts/UlozTo.py @@ -11,13 +11,13 @@ class UlozTo(Account): __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") - TRAFFIC_LEFT_PATTERN = r'<li class="menu-kredit"><a href="/kredit/" title="[^"]*?GB = ([0-9.]+) MB">' + TRAFFIC_LEFT_PATTERN = r'<li class="menu-kredit"><a href="http://www.ulozto.net/kredit" title="[^"]*?GB = ([0-9.]+) MB"' def loadAccountInfo(self, user, req): #this cookie gets lost somehow after each request - self.phpsessid = req.cj.getCookie("PHPSESSID") + self.phpsessid = req.cj.getCookie("ULOSESSID") html = req.load("http://www.ulozto.net/", decode = True) - req.cj.setCookie("www.ulozto.net", "PHPSESSID", self.phpsessid) + 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 diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index d46b303f4..5a930fd8a 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -27,12 +27,12 @@ class UlozTo(SimpleHoster): __name__ = "UlozTo" __type__ = "hoster" __pattern__ = r"http://(\w*\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj.cz|zachowajto.pl)/(?:live/)?(?P<id>\w+/[^/?]*)" - __version__ = "0.90" + __version__ = "0.91" __description__ = """uloz.to""" __author_name__ = ("zoidberg") FILE_NAME_PATTERN = r'<a href="#download" class="jsShowDownload">(?P<N>[^<]+)</a>' - FILE_SIZE_PATTERN = r'<span id="fileSize">.*?(?P<S>[0-9.]+\s[kMG]B)</span>' + FILE_SIZE_PATTERN = r'<span id="fileSize">.*?(?P<S>[0-9.]+\s[kMG]?B)</span>' FILE_INFO_PATTERN = r'<p>File <strong>(?P<N>[^<]+)</strong> is password protected</p>' FILE_OFFLINE_PATTERN = r'<title>404 - Page not found</title>|<h1 class="h1">File (has been deleted|was banned)</h1>' FILE_SIZE_REPLACEMENTS = [('([0-9.]+)\s([kMG])B', convertDecimalPrefix)] |