diff options
author | 2014-07-10 03:02:26 +0200 | |
---|---|---|
committer | 2014-07-10 03:02:26 +0200 | |
commit | 04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 (patch) | |
tree | 703010e32f62bf869551ce0d323dacf62bc448ff /module/plugins/hoster/UlozTo.py | |
parent | [SimpleCrypter] Support parseError (diff) | |
download | pyload-04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8.tar.xz |
Use parseError instead PluginParseError + unified all download pattern attributes as LINK_PATTERN + removed some old patterns (not used anymore) + other code cosmetics
Diffstat (limited to 'module/plugins/hoster/UlozTo.py')
-rw-r--r-- | module/plugins/hoster/UlozTo.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py index d540505f1..0366c6db4 100644 --- a/module/plugins/hoster/UlozTo.py +++ b/module/plugins/hoster/UlozTo.py @@ -36,10 +36,11 @@ class UlozTo(SimpleHoster): __author_name__ = "zoidberg" __author_mail__ = "zoidberg@mujmail.cz" + FILE_INFO_PATTERN = r'<p>File <strong>(?P<N>[^<]+)</strong> is password protected</p>' FILE_NAME_PATTERN = r'<title>(?P<N>[^<]+) \| Uloz.to</title>' 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>' 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)] FILE_URL_REPLACEMENTS = [(r"(?<=http://)([^/]+)", "www.ulozto.net")] @@ -50,6 +51,7 @@ class UlozTo(SimpleHoster): PREMIUM_URL_PATTERN = r'<div class="downloadForm"><form action="([^"]+)"' TOKEN_PATTERN = r'<input type="hidden" name="_token_" id="[^\"]*" value="(?P<token>[^\"]*)" />' + def setup(self): self.multiDL = self.premium self.resumeDownload = True |