summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/DevhostSt.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/DevhostSt.py')
-rw-r--r--module/plugins/hoster/DevhostSt.py29
1 files changed, 9 insertions, 20 deletions
diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py
index 85e36edb3..e7a23f6b1 100644
--- a/module/plugins/hoster/DevhostSt.py
+++ b/module/plugins/hoster/DevhostSt.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# Test links:
-# http://d-h.st/mM8
+# http://d-h.st/mM8
import re
@@ -11,38 +11,27 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DevhostSt(SimpleHoster):
__name__ = "DevhostSt"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.05"
__pattern__ = r'http://(?:www\.)?d-h\.st/(?!users/)\w{3}'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """d-h.st hoster plugin"""
__license__ = "GPLv3"
__authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")]
- NAME_PATTERN = r'>Filename:</span> <div title="(?P<N>.+?)"'
- SIZE_PATTERN = r'>Size:</span> (?P<S>[\d.,]+) (?P<U>[\w^_]+)'
+ NAME_PATTERN = r'<span title="(?P<N>.*?)"'
+ SIZE_PATTERN = r'</span> \((?P<S>[\d.,]+) (?P<U>[\w^_]+)\)<br'
+ HASHSUM_PATTERN = r'>(?P<T>.*?) Sum</span>: &nbsp;(?P<H>.*?)<br'
- OFFLINE_PATTERN = r'>File Not Found<'
- LINK_PATTERN = r'id="downloadfile" href="(.+?)"'
+ OFFLINE_PATTERN = r'>File Not Found'
+ LINK_FREE_PATTERN = r'var product_download_url= \'(.+?)\''
def setup(self):
- self.multiDL = True
+ 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)