From 8c9ae3f167642debe488437b3cefff3adaa560b2 Mon Sep 17 00:00:00 2001 From: zapp-brannigan Date: Sun, 28 Sep 2014 17:05:40 +0200 Subject: New hoster Dev-Host --- module/plugins/hoster/DevhostSt.py | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 module/plugins/hoster/DevhostSt.py (limited to 'module/plugins/hoster/DevhostSt.py') 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:
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) + + if self.checkDownload({'is_html': re.compile("html")}) == "is_html": + self.parseError("The downloaded file is html, something went wrong") + + +getInfo = create_getInfo(DevhostSt) -- cgit v1.2.3 From 59f743bbfde24d94a16c9fc60095014d66a2cb70 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 28 Sep 2014 19:14:58 +0200 Subject: [SpeedyshareCom] Code cleanup --- module/plugins/hoster/DevhostSt.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index fbeb883e1..088ace93a 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -41,8 +41,9 @@ class DevhostSt(SimpleHoster): 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") + 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 From ff91b58bf9ee65aaeb048426295af6ad122b119e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 5 Oct 2014 22:14:53 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/DevhostSt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index 088ace93a..b50257238 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -41,8 +41,8 @@ class DevhostSt(SimpleHoster): self.logDebug("Download URL = " + dl_url) self.download(dl_url, disposition=True) - check = self.checkDownload({'is_html': re.compile("html")}) - if check == "is_html": + check = self.checkDownload({'html': re.compile("html")}) + if check == "html": self.parseError("Downloaded file is an html file") -- cgit v1.2.3 From 4d2aae75e639c3fb78fe1ec454cafea5617ffd4e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 6 Oct 2014 01:50:55 +0200 Subject: [DevhostStFolder] Folder-in-folder support --- module/plugins/hoster/DevhostSt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index b50257238..f64519209 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -9,11 +9,11 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DevhostSt(SimpleHoster): - __name__ = "Devhost" + __name__ = "DevhostSt" __type__ = "hoster" - __version__ = "0.01" + __version__ = "0.02" - __pattern__ = r'http://(?:www\.)?d-h\.st/\w+' + __pattern__ = r'http://(?:www\.)?d-h\.st/(?!users/)\w{3}' __description__ = """d-h.st hoster plugin""" __author_name__ = "zapp-brannigan" -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- module/plugins/hoster/DevhostSt.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index f64519209..d4b227ea1 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -16,8 +16,7 @@ class DevhostSt(SimpleHoster): __pattern__ = r'http://(?:www\.)?d-h\.st/(?!users/)\w{3}' __description__ = """d-h.st hoster plugin""" - __author_name__ = "zapp-brannigan" - __author_mail__ = "fuerst.reinje@web.de" + __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] FILE_NAME_PATTERN = r'>Filename:
Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/hoster/DevhostSt.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index d4b227ea1..07a94f7ec 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -16,6 +16,7 @@ class DevhostSt(SimpleHoster): __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")] -- cgit v1.2.3 From c5d1a4fd8943877c6d2eb3843e0de725dba5191e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:09:53 +0200 Subject: Pattern update 2 --- module/plugins/hoster/DevhostSt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index 07a94f7ec..9b59ff5df 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -21,7 +21,7 @@ class DevhostSt(SimpleHoster): FILE_NAME_PATTERN = r'>Filename:
Size: (?P[\d.]+) (?P\w+)' + FILE_SIZE_PATTERN = r'>Size: (?P[\d.,]+) (?P\w+)' OFFLINE_PATTERN = r'>File Not Found<' LINK_PATTERN = r'id="downloadfile" href="(.+?)"' -- cgit v1.2.3 From 388a2f6478d42e423f1f8442d8539983f3762f22 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 14 Oct 2014 13:38:49 +0200 Subject: Improve unit detection in size pattern --- module/plugins/hoster/DevhostSt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index 9b59ff5df..5c9055ca0 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -21,7 +21,7 @@ class DevhostSt(SimpleHoster): FILE_NAME_PATTERN = r'>Filename:
Size: (?P[\d.,]+) (?P\w+)' + FILE_SIZE_PATTERN = r'>Size: (?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = r'>File Not Found<' LINK_PATTERN = r'id="downloadfile" href="(.+?)"' -- cgit v1.2.3 From 2ae91b81a2f12a1c9b1f78524df78a2b3f1ef494 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Oct 2014 14:52:42 +0200 Subject: Update hosters to self.error --- module/plugins/hoster/DevhostSt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index 5c9055ca0..6ad6a551f 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.02" + __version__ = "0.03" __pattern__ = r'http://(?:www\.)?d-h\.st/(?!users/)\w{3}' @@ -35,7 +35,7 @@ class DevhostSt(SimpleHoster): def handleFree(self): m = re.search(self.LINK_PATTERN, self.html) if m is None: - self.parseError("Download link not found") + self.error("Download link not found") dl_url = m.group(1) self.logDebug("Download URL = " + dl_url) @@ -43,7 +43,7 @@ class DevhostSt(SimpleHoster): check = self.checkDownload({'html': re.compile("html")}) if check == "html": - self.parseError("Downloaded file is an html file") + self.error("Downloaded file is an html file") getInfo = create_getInfo(DevhostSt) -- cgit v1.2.3 From f00dbe52cee93a0aad9b6747419ff7271adb6e84 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 10:12:21 +0200 Subject: Code cosmetics --- module/plugins/hoster/DevhostSt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index 6ad6a551f..643538e4d 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -43,7 +43,7 @@ class DevhostSt(SimpleHoster): check = self.checkDownload({'html': re.compile("html")}) if check == "html": - self.error("Downloaded file is an html file") + self.error("Downloaded file is an html page") getInfo = create_getInfo(DevhostSt) -- cgit v1.2.3 From 4da90891eb2544ac15a7d512aba8cb357f68ee5f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Oct 2014 01:11:29 +0200 Subject: Spare code cosmetics --- module/plugins/hoster/DevhostSt.py | 1 - 1 file changed, 1 deletion(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index 643538e4d..fce9e6387 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -38,7 +38,6 @@ class DevhostSt(SimpleHoster): self.error("Download link not found") dl_url = m.group(1) - self.logDebug("Download URL = " + dl_url) self.download(dl_url, disposition=True) check = self.checkDownload({'html': re.compile("html")}) -- cgit v1.2.3 From 9f2ebe486a3e155fb6a60e07cccb77ab6a772eb2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 26 Oct 2014 02:31:54 +0200 Subject: Extend translation support in plugins + a lot of code cosmetics and typo fixes --- module/plugins/hoster/DevhostSt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index fce9e6387..d96209b3f 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -35,14 +35,14 @@ class DevhostSt(SimpleHoster): def handleFree(self): m = re.search(self.LINK_PATTERN, self.html) if m is None: - self.error("Download link not found") + 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") + self.error(_("Downloaded file is an html page")) getInfo = create_getInfo(DevhostSt) -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/hoster/DevhostSt.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index d96209b3f..38e80c156 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -9,15 +9,15 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class DevhostSt(SimpleHoster): - __name__ = "DevhostSt" - __type__ = "hoster" + __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")] + __license__ = "GPLv3" + __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] FILE_NAME_PATTERN = r'>Filename:
Date: Sun, 2 Nov 2014 22:47:07 +0100 Subject: Update all other plugins --- module/plugins/hoster/DevhostSt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/DevhostSt.py') diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py index 38e80c156..85e36edb3 100644 --- a/module/plugins/hoster/DevhostSt.py +++ b/module/plugins/hoster/DevhostSt.py @@ -20,8 +20,8 @@ class DevhostSt(SimpleHoster): __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")] - FILE_NAME_PATTERN = r'>Filename:
Size: (?P[\d.,]+) (?P[\w^_]+)' + NAME_PATTERN = r'>Filename:
Size: (?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = r'>File Not Found<' LINK_PATTERN = r'id="downloadfile" href="(.+?)"' -- cgit v1.2.3