diff options
author | zoidberg10 <zoidberg@mujmail.cz> | 2011-11-22 00:26:08 +0100 |
---|---|---|
committer | zoidberg10 <zoidberg@mujmail.cz> | 2011-11-22 00:26:08 +0100 |
commit | 9378237ddc39f8ee96e7a3ddb9cc37ce487c5f4d (patch) | |
tree | 325aba4194c29ee7869f662e1b8f8b5015afd283 /module/plugins/hoster/MultishareCz.py | |
parent | SimpleHoster fix (diff) | |
download | pyload-9378237ddc39f8ee96e7a3ddb9cc37ce487c5f4d.tar.xz |
fix filepost (#431), hellspy, ifolder, letitbit, change SimpleHoster patterns
Diffstat (limited to 'module/plugins/hoster/MultishareCz.py')
-rw-r--r-- | module/plugins/hoster/MultishareCz.py | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py index ac35d93e1..bf1d9f3bf 100644 --- a/module/plugins/hoster/MultishareCz.py +++ b/module/plugins/hoster/MultishareCz.py @@ -17,28 +17,18 @@ """ import re -from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo -from module.network.RequestFactory import getURL - -def getInfo(urls): - result = [] - - for url in urls: - file_info = parseFileInfo(MultishareCz, url, getURL(url, decode=True)) - result.append(file_info) - - yield result +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class MultishareCz(SimpleHoster): __name__ = "MultishareCz" __type__ = "hoster" __pattern__ = r"http://(\w*\.)?multishare.cz/stahnout/.*" - __version__ = "0.31" + __version__ = "0.32" __description__ = """MultiShare.cz""" __author_name__ = ("zoidberg") FILE_ID_PATTERN = r'/stahnout/(\d+)/' - FILE_INFO_PATTERN = ur'<ul class="no-padding"><li>Název: <strong>([^<]+)</strong></li><li>Velikost: <strong>([^&]+) ([^<]+)</strong>' + FILE_INFO_PATTERN = ur'<ul class="no-padding"><li>Název: <strong>(?P<N>[^<]+)</strong></li><li>Velikost: <strong>(?P<S>[^&]+) (?P<U>[^<]+)</strong>' FILE_OFFLINE_PATTERN = ur'<h1>Stáhnout soubor</h1><p><strong>Požadovaný soubor neexistuje.</strong></p>' def handleFree(self): @@ -49,4 +39,6 @@ class MultishareCz(SimpleHoster): self.download("http://www.multishare.cz/html/download_free.php", get={ "ID": file_id - })
\ No newline at end of file + }) + +getInfo = create_getInfo(MultishareCz)
\ No newline at end of file |