diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-04 01:33:23 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-04 01:33:23 +0200 |
commit | 2b0b389ffe470185962ca6539e7eb9ed7e415676 (patch) | |
tree | c0fabaf64150a0cfec5326a6dd6fe370abaf45ce | |
parent | Fix https://github.com/pyload/pyload/issues/1351 (diff) | |
parent | new hoster SizedriveCom (diff) | |
download | pyload-2b0b389ffe470185962ca6539e7eb9ed7e415676.tar.xz |
Merge pull request #1389 from GammaC0de/GammaC0de-SizedriveCom
[New Hoster] sizedrive.com
-rw-r--r-- | module/plugins/hoster/SizedriveCom.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/module/plugins/hoster/SizedriveCom.py b/module/plugins/hoster/SizedriveCom.py new file mode 100644 index 000000000..13a29eb99 --- /dev/null +++ b/module/plugins/hoster/SizedriveCom.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- + +import re + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class SizedriveCom(SimpleHoster): + __name__ = "SizedriveCom" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r'http://(?:www\.)?sizedrive\.com/[rd]/(?P<ID>\w+)' + + __description__ = """Sizedrive.com hoster plugin""" + __license__ = "GPLv3" + __authors__ = [("GammaC0de", None)] + + + OFFLINE_PATTERN = r'ARQUIVO DELATADO POR' + NAME_PATTERN = r'<b>Nome:</b> (?P<N>.+)<' + SIZE_PATTERN = r'<b>Tamanho:</b>(?P<S>[\d.,]+) (?P<U>[\w^_]+)' + + def setup(self): + self.resumeDownload = False + self.multiDL = False + self.chunkLimit = 1 + + + def handleFree(self, pyfile): + self.wait(5) + self.html = self.load("http://www.sizedrive.com/getdownload.php", + post={'id': self.info['pattern']['ID']}) + + m = re.search(r'<span id="boton_download" ><a href="(.+?)"', self.html) + if m: + self.link = m.group(1) + else: + self.error(_("Download link not found")) + + +getInfo = create_getInfo(SizedriveCom) |