summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar zapp-brannigan <fuerst.reinje@web.de> 2014-09-28 17:05:40 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-09-28 17:05:40 +0200
commit8c9ae3f167642debe488437b3cefff3adaa560b2 (patch)
tree43f68ce25358962cd3b5d0860a0972fa12c836d0 /module
parentCleaned-up XFileSharingPro based plugins (diff)
downloadpyload-8c9ae3f167642debe488437b3cefff3adaa560b2.tar.xz
New hoster Dev-Host
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hoster/DevhostSt.py48
1 files changed, 48 insertions, 0 deletions
diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py
new file mode 100644
index 000000000..fbeb883e1
--- /dev/null
+++ b/module/plugins/hoster/DevhostSt.py
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+#
+# Test links:
+# http://d-h.st/mM8
+
+import re
+
+from module.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:</span> <div title="(?P<N>.+?)"'
+ FILE_SIZE_PATTERN = r'>Size:</span> (?P<S>[\d.]+) (?P<U>\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)
+
+ if self.checkDownload({'is_html': re.compile("html")}) == "is_html":
+ self.parseError("The downloaded file is html, something went wrong")
+
+
+getInfo = create_getInfo(DevhostSt)