From 28efa58f2f7a4ee68516d92b869f2581a19c60e0 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 9 Jul 2014 21:51:19 +0200 Subject: New hoster RemixshareCom --- module/plugins/hoster/RemixshareCom.py | 56 ++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 module/plugins/hoster/RemixshareCom.py (limited to 'module/plugins/hoster/RemixshareCom.py') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py new file mode 100644 index 000000000..dedb3b8e1 --- /dev/null +++ b/module/plugins/hoster/RemixshareCom.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +#Testlink: +#http://remixshare.com/download/p946u +# +# The remixshare.com website is very very slow, so +# if your download not starts because of pycurl timeouts: +# Adjust timeouts in /usr/share/pyload/module/network/HTTPRequest.py +# + +import re + +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo + + +class RemixshareCom(SimpleHoster): + __name__ = "RemixshareCom" + __type__ = "hoster" + __pattern__ = r'https?://remixshare\.com/(download|dl)/\w+' + __version__ = "0.01" + __description__ = """Remixshare.com hoster plugin""" + __author_name__ = ("zapp-brannigan", "Walter Purcaro") + __author_mail__ = ("fuerst.reinje@web.de", "vuolter@gmail.com") + + FILE_INFO_PATTERN = r'title=\'.+?\'>(?P.+?) \((?P\d+) (?P\w+)\)<' + OFFLINE_PATTERN = r'

Ooops!<' + + WAIT_PATTERN = r'var XYZ = "(\d+)"' + FILE_URL_PATTERN = r'(http://remixshare.com/downloadfinal/.+?)"' + FILE_TOKEN_PATTERN = r'var acc = (\d+)' + + + def setup(self): + self.multiDL = True + self.chunkLimit = 1 + + def handleFree(self): + b = re.search(self.FILE_URL_PATTERN, self.html) + if not b: + self.fail("Can not parse download url") + c = re.search(self.FILE_TOKEN_PATTERN, self.html) + if not c: + self.fail("Can not parse file token") + dl_url = b.group(1) + c.group(1) + + #Check if we have to wait + seconds = re.search(self.WAIT_PATTERN, self.html) + if seconds: + self.logDebug("Wait " + seconds.group(1)) + self.wait(seconds.group(1)) + + # Finally start downloading... + self.logDebug("Download-URL: " + dl_url) + self.download(dl_url, disposition=True) + + +getInfo = create_getInfo(RemixshareCom) -- cgit v1.2.3 From 04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 10 Jul 2014 03:02:26 +0200 Subject: Use parseError instead PluginParseError + unified all download pattern attributes as LINK_PATTERN + removed some old patterns (not used anymore) + other code cosmetics --- module/plugins/hoster/RemixshareCom.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'module/plugins/hoster/RemixshareCom.py') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index dedb3b8e1..a0f67e0b2 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -1,11 +1,13 @@ # -*- coding: utf-8 -*- -#Testlink: -#http://remixshare.com/download/p946u -# + +# Test link: +# http://remixshare.com/download/p946u + +# Note: # The remixshare.com website is very very slow, so # if your download not starts because of pycurl timeouts: # Adjust timeouts in /usr/share/pyload/module/network/HTTPRequest.py -# + import re @@ -24,9 +26,9 @@ class RemixshareCom(SimpleHoster): FILE_INFO_PATTERN = r'title=\'.+?\'>(?P.+?) \((?P\d+) (?P\w+)\)<' OFFLINE_PATTERN = r'

Ooops!<' - WAIT_PATTERN = r'var XYZ = "(\d+)"' - FILE_URL_PATTERN = r'(http://remixshare.com/downloadfinal/.+?)"' - FILE_TOKEN_PATTERN = r'var acc = (\d+)' + LINK_PATTERN = r'(http://remixshare\.com/downloadfinal/.+?)"' + TOKEN_PATTERN = r'var acc = (\d+)' + WAIT_PATTERN = r'var XYZ = r"(\d+)"' def setup(self): @@ -34,12 +36,12 @@ class RemixshareCom(SimpleHoster): self.chunkLimit = 1 def handleFree(self): - b = re.search(self.FILE_URL_PATTERN, self.html) + b = re.search(self.LINK_PATTERN, self.html) if not b: - self.fail("Can not parse download url") - c = re.search(self.FILE_TOKEN_PATTERN, self.html) + self.parseError("Cannot parse download url") + c = re.search(self.TOKEN_PATTERN, self.html) if not c: - self.fail("Can not parse file token") + self.parseError("Cannot parse file token") dl_url = b.group(1) + c.group(1) #Check if we have to wait @@ -49,7 +51,7 @@ class RemixshareCom(SimpleHoster): self.wait(seconds.group(1)) # Finally start downloading... - self.logDebug("Download-URL: " + dl_url) + self.logDebug("Download URL = r" + dl_url) self.download(dl_url, disposition=True) -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/hoster/RemixshareCom.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/RemixshareCom.py') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index a0f67e0b2..ea396495e 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -1,14 +1,13 @@ # -*- coding: utf-8 -*- - -# Test link: +# +# Test links: # http://remixshare.com/download/p946u - +# # Note: # The remixshare.com website is very very slow, so # if your download not starts because of pycurl timeouts: # Adjust timeouts in /usr/share/pyload/module/network/HTTPRequest.py - import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo @@ -17,8 +16,10 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class RemixshareCom(SimpleHoster): __name__ = "RemixshareCom" __type__ = "hoster" - __pattern__ = r'https?://remixshare\.com/(download|dl)/\w+' __version__ = "0.01" + + __pattern__ = r'https?://remixshare\.com/(download|dl)/\w+' + __description__ = """Remixshare.com hoster plugin""" __author_name__ = ("zapp-brannigan", "Walter Purcaro") __author_mail__ = ("fuerst.reinje@web.de", "vuolter@gmail.com") -- 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/RemixshareCom.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/RemixshareCom.py') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index ea396495e..4507e1dbe 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -21,8 +21,9 @@ class RemixshareCom(SimpleHoster): __pattern__ = r'https?://remixshare\.com/(download|dl)/\w+' __description__ = """Remixshare.com hoster plugin""" - __author_name__ = ("zapp-brannigan", "Walter Purcaro") - __author_mail__ = ("fuerst.reinje@web.de", "vuolter@gmail.com") + __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de"), + ("Walter Purcaro", "vuolter@gmail.com")] + FILE_INFO_PATTERN = r'title=\'.+?\'>(?P.+?) \((?P\d+) (?P\w+)\)<' OFFLINE_PATTERN = r'

Ooops!<' -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- module/plugins/hoster/RemixshareCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/RemixshareCom.py') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index 4507e1dbe..dc50fcbfd 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -21,6 +21,7 @@ class RemixshareCom(SimpleHoster): __pattern__ = r'https?://remixshare\.com/(download|dl)/\w+' __description__ = """Remixshare.com hoster plugin""" + __license__ = "GPLv3" __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de"), ("Walter Purcaro", "vuolter@gmail.com")] -- 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/RemixshareCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/RemixshareCom.py') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index dc50fcbfd..5e691c2bc 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -26,7 +26,7 @@ class RemixshareCom(SimpleHoster): ("Walter Purcaro", "vuolter@gmail.com")] - FILE_INFO_PATTERN = r'title=\'.+?\'>(?P.+?) \((?P\d+) (?P\w+)\)<' + FILE_INFO_PATTERN = r'title=\'.+?\'>(?P.+?) \((?P\d+) (?P[\w^_]+)\)<' OFFLINE_PATTERN = r'

Ooops!<' LINK_PATTERN = r'(http://remixshare\.com/downloadfinal/.+?)"' -- 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/RemixshareCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/hoster/RemixshareCom.py') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index 5e691c2bc..4e812b20d 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class RemixshareCom(SimpleHoster): __name__ = "RemixshareCom" __type__ = "hoster" - __version__ = "0.01" + __version__ = "0.02" __pattern__ = r'https?://remixshare\.com/(download|dl)/\w+' @@ -41,10 +41,10 @@ class RemixshareCom(SimpleHoster): def handleFree(self): b = re.search(self.LINK_PATTERN, self.html) if not b: - self.parseError("Cannot parse download url") + self.error("Cannot parse download url") c = re.search(self.TOKEN_PATTERN, self.html) if not c: - self.parseError("Cannot parse file token") + self.error("Cannot parse file token") dl_url = b.group(1) + c.group(1) #Check if we have to wait -- cgit v1.2.3 From 0eb6e7ec4a1144dcca824d8add049787d3da1762 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 22 Oct 2014 19:44:59 +0200 Subject: Two space before function declaration --- module/plugins/hoster/RemixshareCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/RemixshareCom.py') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index 4e812b20d..94be78b4f 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -38,6 +38,7 @@ class RemixshareCom(SimpleHoster): self.multiDL = True self.chunkLimit = 1 + def handleFree(self): b = re.search(self.LINK_PATTERN, self.html) if not b: -- 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/RemixshareCom.py | 1 - 1 file changed, 1 deletion(-) (limited to 'module/plugins/hoster/RemixshareCom.py') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index 94be78b4f..38c55afc3 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -55,7 +55,6 @@ class RemixshareCom(SimpleHoster): self.wait(seconds.group(1)) # Finally start downloading... - self.logDebug("Download URL = r" + dl_url) self.download(dl_url, disposition=True) -- 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/RemixshareCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/RemixshareCom.py') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index 38c55afc3..e294d4b87 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -42,10 +42,10 @@ class RemixshareCom(SimpleHoster): def handleFree(self): b = re.search(self.LINK_PATTERN, self.html) if not b: - self.error("Cannot parse download url") + self.error(_("Cannot parse download url")) c = re.search(self.TOKEN_PATTERN, self.html) if not c: - self.error("Cannot parse file token") + self.error(_("Cannot parse file token")) dl_url = b.group(1) + c.group(1) #Check if we have to wait -- 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/RemixshareCom.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/hoster/RemixshareCom.py') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index e294d4b87..08ecdc6c5 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -14,16 +14,16 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class RemixshareCom(SimpleHoster): - __name__ = "RemixshareCom" - __type__ = "hoster" + __name__ = "RemixshareCom" + __type__ = "hoster" __version__ = "0.02" __pattern__ = r'https?://remixshare\.com/(download|dl)/\w+' __description__ = """Remixshare.com hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de"), - ("Walter Purcaro", "vuolter@gmail.com")] + __license__ = "GPLv3" + __authors__ = [("zapp-brannigan", "fuerst.reinje@web.de"), + ("Walter Purcaro", "vuolter@gmail.com")] FILE_INFO_PATTERN = r'title=\'.+?\'>(?P.+?) \((?P\d+) (?P[\w^_]+)\)<' -- cgit v1.2.3 From 772e47ef806d18fd209e910be0535bce7c07dc7b Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 2 Nov 2014 22:47:07 +0100 Subject: Update all other plugins --- module/plugins/hoster/RemixshareCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/RemixshareCom.py') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index 08ecdc6c5..ca1e2e342 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -26,7 +26,7 @@ class RemixshareCom(SimpleHoster): ("Walter Purcaro", "vuolter@gmail.com")] - FILE_INFO_PATTERN = r'title=\'.+?\'>(?P.+?) \((?P\d+) (?P[\w^_]+)\)<' + INFO_PATTERN = r'title=\'.+?\'>(?P.+?) \((?P\d+) (?P[\w^_]+)\)<' OFFLINE_PATTERN = r'

Ooops!<' LINK_PATTERN = r'(http://remixshare\.com/downloadfinal/.+?)"' -- cgit v1.2.3 From be05dce2da77bca4613efbdfb0f6357a983e6e1c Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 3 Dec 2014 14:38:22 +0100 Subject: Fix https://github.com/pyload/pyload/issues/943 --- module/plugins/hoster/RemixshareCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/RemixshareCom.py') diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py index ca1e2e342..ed171895e 100644 --- a/module/plugins/hoster/RemixshareCom.py +++ b/module/plugins/hoster/RemixshareCom.py @@ -52,7 +52,7 @@ class RemixshareCom(SimpleHoster): seconds = re.search(self.WAIT_PATTERN, self.html) if seconds: self.logDebug("Wait " + seconds.group(1)) - self.wait(seconds.group(1)) + self.wait(int(seconds.group(1))) # Finally start downloading... self.download(dl_url, disposition=True) -- cgit v1.2.3