From f62715c5d2c6eb6379119b220a271b5b73da689f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 3 Oct 2014 17:46:50 +0200 Subject: Fix previous merge commit --- pyload/plugins/accounts/DevhostSt.py | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 pyload/plugins/accounts/DevhostSt.py (limited to 'pyload/plugins/accounts/DevhostSt.py') diff --git a/pyload/plugins/accounts/DevhostSt.py b/pyload/plugins/accounts/DevhostSt.py new file mode 100644 index 000000000..03d7d9964 --- /dev/null +++ b/pyload/plugins/accounts/DevhostSt.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# +# Test links: +# http://d-h.st/mM8 + +import re + +from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class DevhostSt(SimpleHoster): + __name__ = "Devhost" + __type__ = "hoster" + __version__ = "0.01" + + __pattern__ = r'http://(?:www\.)?d-h\.st/\w+' + + __description__ = """d-h.st hoster plugin""" + __author_name__ = "zapp-brannigan" + __author_mail__ = "fuerst.reinje@web.de" + + + FILE_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.parseError("Download link not found") + + dl_url = m.group(1) + self.logDebug("Download URL = " + dl_url) + self.download(dl_url, disposition=True) + + check = self.checkDownload({'is_html': re.compile("html")}) + if check == "is_html": + self.parseError("Downloaded file is an html file") + + +getInfo = create_getInfo(DevhostSt) -- cgit v1.2.3