From fd105f8e51768ec1943cda2375bdfdbe5b0a3951 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 9 Jan 2015 00:35:51 +0100 Subject: "New Year" Update: hoster plugins --- module/plugins/hoster/DevhostSt.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index 85e36edb3..2a8734655 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DevhostSt(SimpleHoster): __name__ = "DevhostSt" __type__ = "hoster" - __version__ = "0.03" + __version__ = "0.04" __pattern__ = r'http://(?:www\.)?d-h\.st/(?!users/)\w{3}' @@ -24,7 +24,7 @@ class DevhostSt(SimpleHoster): SIZE_PATTERN = r'>Size: (?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = r'>File Not Found<' - LINK_PATTERN = r'id="downloadfile" href="(.+?)"' + LINK_FREE_PATTERN = r'id="downloadfile" href="(.+?)"' def setup(self): @@ -32,17 +32,4 @@ class DevhostSt(SimpleHoster): 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 From 3cd3896dd84907efd031a00e3a59ab576f590c19 Mon Sep 17 00:00:00 2001 From: zapp-brannigan Date: Thu, 5 Feb 2015 13:47:03 +0100 Subject: [Hoster] Update DevhostSt.py They have changed their website, the plugin was not working anymore. --- module/plugins/hoster/DevhostSt.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index 2a8734655..0a66083ba 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DevhostSt(SimpleHoster): __name__ = "DevhostSt" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'http://(?:www\.)?d-h\.st/(?!users/)\w{3}' @@ -20,16 +20,25 @@ class DevhostSt(SimpleHoster): __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] - NAME_PATTERN = r'>Filename:
Size: (?P[\d.,]+) (?P[\w^_]+)' + NAME_PATTERN = r' \((?P[\d.,]+) (?P[\w^_]+)\)(?P.*?) Sum:  (?P.*?)File Not Found<' - LINK_FREE_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.chunkLimit = 1 + + def handleFree(self, pyfile): + link = re.search(self.LINK_FREE_PATTERN,self.html) + try: + self.logDebug("DL-Link: %s" % link.group(1)) + self.download(link.group(1), disposition=True) + except AttributeError: + self.error(_("DL-Link not found")) getInfo = create_getInfo(DevhostSt) -- cgit v1.2.3 From 43ee4da730bbc18a24c4d721565298fca16ce077 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 7 Feb 2015 23:24:51 +0100 Subject: [DevhostSt] Cleanup --- module/plugins/hoster/DevhostSt.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index 0a66083ba..d786ba135 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 @@ -24,21 +24,13 @@ class DevhostSt(SimpleHoster): SIZE_PATTERN = r' \((?P[\d.,]+) (?P[\w^_]+)\)(?P.*?) Sum:  (?P.*?)File Not Found<' - LINK_FREE_PATTERN = r'var product_download_url= \'(.*?)\';' + 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, pyfile): - link = re.search(self.LINK_FREE_PATTERN,self.html) - try: - self.logDebug("DL-Link: %s" % link.group(1)) - self.download(link.group(1), disposition=True) - except AttributeError: - self.error(_("DL-Link not found")) getInfo = create_getInfo(DevhostSt) -- cgit v1.2.3