From acc46fc3497a66a427b795b4a22c6e71d69185a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 13 Dec 2014 15:56:57 +0100 Subject: Update --- pyload/plugin/hoster/DevhostSt.py | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pyload/plugin/hoster/DevhostSt.py (limited to 'pyload/plugin/hoster/DevhostSt.py') diff --git a/pyload/plugin/hoster/DevhostSt.py b/pyload/plugin/hoster/DevhostSt.py new file mode 100644 index 000000000..42a6e27f1 --- /dev/null +++ b/pyload/plugin/hoster/DevhostSt.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# +# Test links: +# http://d-h.st/mM8 + +import re + +from pyload.plugin.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class DevhostSt(SimpleHoster): + __name = "DevhostSt" + __type = "hoster" + __version = "0.03" + + __pattern = r'http://(?:www\.)?d-h\.st/(?!users/)\w{3}' + + __description = """d-h.st hoster plugin""" + __license = "GPLv3" + __authors = [("zapp-brannigan", "fuerst.reinje@web.de")] + + + NAME_PATTERN = r'>Filename:
Size: (?P[\d.,]+) (?P[\w^_]+)' + + OFFLINE_PATTERN = r'>File Not Found<' + LINK_PATTERN = r'id="downloadfile" href="(.+?)"' + + + def setup(self): + self.multiDL = True + self.chunkLimit = 1 + + + def handleFree(self): + m = re.search(self.LINK_PATTERN, self.html) + if m is None: + self.error(_("Download link not found")) + + dl_url = m.group(1) + self.download(dl_url, disposition=True) + + check = self.checkDownload({'html': re.compile("html")}) + if check == "html": + self.error(_("Downloaded file is an html page")) + + +getInfo = create_getInfo(DevhostSt) -- cgit v1.2.3