# -*- 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)