From 57300575fa97107d172e0c9909b244c8c8ae6c12 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Dec 2014 20:02:20 +0100 Subject: Extend SimpleHoster in multi-hoster plugins --- module/plugins/hoster/RehostTo.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 7cde01025..067dd8dbe 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -2,10 +2,10 @@ from urllib import quote, unquote -from module.plugins.Hoster import Hoster +from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo -class RehostTo(Hoster): +class RehostTo(SimpleHoster): __name__ = "RehostTo" __type__ = "hoster" __version__ = "0.13" @@ -22,23 +22,21 @@ class RehostTo(Hoster): def setup(self): - self.chunkLimit = 1 + self.chunkLimit = 1 self.resumeDownload = True - def process(self, pyfile): - if not self.account: - self.logError(_("Please enter your %s account or deactivate this plugin") % "rehost.to") - self.fail(_("No rehost.to account provided")) - + def handleMulti(self): data = self.account.getAccountInfo(self.user) long_ses = data['long_ses'] - self.logDebug("Rehost.to: Old URL: %s" % pyfile.url) - #raise timeout to 2min self.req.setOption("timeout", 120) + self.link = True self.download("http://rehost.to/process_download.php", - get={'user': "cookie", 'pass': long_ses, 'dl': quote(pyfile.url, "")}, + get={'user': "cookie", 'pass': long_ses, 'dl': quote(self.pyfile.url, "")}, disposition=True) + + +getInfo = create_getInfo(RehostTo) -- cgit v1.2.3 From 46f748a94ea5ab62ab0839ff0ce01e12e3eac688 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Dec 2014 21:47:39 +0100 Subject: Extend SimpleHoster in multi-hoster plugins (2) --- module/plugins/hoster/RehostTo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 067dd8dbe..4f978cdce 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class RehostTo(SimpleHoster): __name__ = "RehostTo" __type__ = "hoster" - __version__ = "0.13" + __version__ = "0.14" __pattern__ = r'https?://.*rehost\.to\..*' -- cgit v1.2.3 From 0860e09f5ff16ee3f097f6f9d444f277a38abd72 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Dec 2014 23:03:46 +0100 Subject: Extend SimpleHoster in multi-hoster plugins (3) --- module/plugins/hoster/RehostTo.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 4f978cdce..dbd943d37 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -17,6 +17,9 @@ class RehostTo(SimpleHoster): __authors__ = [("RaNaN", "RaNaN@pyload.org")] + MULTI_HOSTER = True + + def getFilename(self, url): return unquote(url.rsplit("/", 1)[1]) -- cgit v1.2.3 From 87203e996fb42c172b15e29f0e394d5b328d9ac2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 23 Dec 2014 13:20:53 +0100 Subject: New plugin: MultiHoster --- module/plugins/hoster/RehostTo.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index dbd943d37..da0baf913 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -2,13 +2,13 @@ from urllib import quote, unquote -from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo +from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo -class RehostTo(SimpleHoster): +class RehostTo(MultiHoster): __name__ = "RehostTo" __type__ = "hoster" - __version__ = "0.14" + __version__ = "0.15" __pattern__ = r'https?://.*rehost\.to\..*' @@ -17,9 +17,6 @@ class RehostTo(SimpleHoster): __authors__ = [("RaNaN", "RaNaN@pyload.org")] - MULTI_HOSTER = True - - def getFilename(self, url): return unquote(url.rsplit("/", 1)[1]) -- cgit v1.2.3 From a4786e340993bbfc5d2bf971c9bec18863d3dd80 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 23 Dec 2014 19:29:15 +0100 Subject: [MultiHoster] Update --- module/plugins/hoster/RehostTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index da0baf913..b1d0c6e93 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class RehostTo(MultiHoster): __name__ = "RehostTo" __type__ = "hoster" - __version__ = "0.15" + __version__ = "0.16" __pattern__ = r'https?://.*rehost\.to\..*' @@ -26,7 +26,7 @@ class RehostTo(MultiHoster): self.resumeDownload = True - def handleMulti(self): + def handlePremium(self): data = self.account.getAccountInfo(self.user) long_ses = data['long_ses'] -- cgit v1.2.3 From cdb06469a640c1875229903a2dbdfa8be469b5bc Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Dec 2014 13:52:30 +0100 Subject: Improve a lot of plugin __pattern__ --- module/plugins/hoster/RehostTo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index b1d0c6e93..2971a6781 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -10,7 +10,7 @@ class RehostTo(MultiHoster): __type__ = "hoster" __version__ = "0.16" - __pattern__ = r'https?://.*rehost\.to\..*' + __pattern__ = r'https?://.*rehost\.to\..+' __description__ = """Rehost.com hoster plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From ca08d2dacde1685807bfdb4c876e070af2032f25 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 2 Jan 2015 02:51:21 +0100 Subject: [RehostTo] Fixup --- module/plugins/hoster/RehostTo.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 2971a6781..8cfe833fd 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class RehostTo(MultiHoster): __name__ = "RehostTo" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.17" __pattern__ = r'https?://.*rehost\.to\..+' @@ -21,21 +21,14 @@ class RehostTo(MultiHoster): return unquote(url.rsplit("/", 1)[1]) - def setup(self): - self.chunkLimit = 1 - self.resumeDownload = True - - def handlePremium(self): - data = self.account.getAccountInfo(self.user) + data = self.account.getAccountInfo(self.user) long_ses = data['long_ses'] - #raise timeout to 2min - self.req.setOption("timeout", 120) - - self.link = True self.download("http://rehost.to/process_download.php", - get={'user': "cookie", 'pass': long_ses, 'dl': quote(self.pyfile.url, "")}, + get={'user': "cookie", + 'pass': long_ses, + 'dl' : self.pyfile.url}, disposition=True) -- cgit v1.2.3 From 8d1231901b3ccccdc2d3d2593c0baf4ff7be4220 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 2 Jan 2015 15:46:46 +0100 Subject: Spare code cosmetics --- module/plugins/hoster/RehostTo.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 8cfe833fd..5dd17e374 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from urllib import quote, unquote +from urllib import unquote from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo @@ -22,12 +22,11 @@ class RehostTo(MultiHoster): def handlePremium(self): - data = self.account.getAccountInfo(self.user) - long_ses = data['long_ses'] + data = self.account.getAccountInfo(self.user) self.download("http://rehost.to/process_download.php", get={'user': "cookie", - 'pass': long_ses, + 'pass': data['long_ses'], 'dl' : self.pyfile.url}, disposition=True) -- cgit v1.2.3 From 7979d0833573a107baae8c45330b8b5874630a76 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 4 Jan 2015 20:26:13 +0100 Subject: Spare code improvements --- module/plugins/hoster/RehostTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 5dd17e374..96443d5f5 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class RehostTo(MultiHoster): __name__ = "RehostTo" __type__ = "hoster" - __version__ = "0.17" + __version__ = "0.18" __pattern__ = r'https?://.*rehost\.to\..+' @@ -22,7 +22,7 @@ class RehostTo(MultiHoster): def handlePremium(self): - data = self.account.getAccountInfo(self.user) + data = self.account.getAccountData(self.user) self.download("http://rehost.to/process_download.php", get={'user': "cookie", -- cgit v1.2.3 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/RehostTo.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 96443d5f5..f87c7f3ff 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -8,26 +8,22 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class RehostTo(MultiHoster): __name__ = "RehostTo" __type__ = "hoster" - __version__ = "0.18" + __version__ = "0.19" __pattern__ = r'https?://.*rehost\.to\..+' - __description__ = """Rehost.com hoster plugin""" + __description__ = """Rehost.com multi-hoster plugin""" __license__ = "GPLv3" __authors__ = [("RaNaN", "RaNaN@pyload.org")] - def getFilename(self, url): - return unquote(url.rsplit("/", 1)[1]) - - - def handlePremium(self): + def handlePremium(self, pyfile): data = self.account.getAccountData(self.user) self.download("http://rehost.to/process_download.php", get={'user': "cookie", 'pass': data['long_ses'], - 'dl' : self.pyfile.url}, + 'dl' : pyfile.url}, disposition=True) -- cgit v1.2.3 From b617325d793a55d25f4812b1c6a7b9e656b9c73f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 10 Jan 2015 15:55:06 +0100 Subject: [RehostTo] Fix https://github.com/pyload/pyload/issues/1009 --- module/plugins/hoster/RehostTo.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index f87c7f3ff..e706fa6c6 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class RehostTo(MultiHoster): __name__ = "RehostTo" __type__ = "hoster" - __version__ = "0.19" + __version__ = "0.20" __pattern__ = r'https?://.*rehost\.to\..+' @@ -18,11 +18,9 @@ class RehostTo(MultiHoster): def handlePremium(self, pyfile): - data = self.account.getAccountData(self.user) - self.download("http://rehost.to/process_download.php", get={'user': "cookie", - 'pass': data['long_ses'], + 'pass': self.account.getAccountData(self.user)['session'], 'dl' : pyfile.url}, disposition=True) -- cgit v1.2.3 From fa5cf2866dd7c5a16f2aeb0bc6903ca3968101b3 Mon Sep 17 00:00:00 2001 From: Shuralon Date: Sun, 11 Jan 2015 14:27:00 +0100 Subject: [RehostTo] Fix --- module/plugins/hoster/RehostTo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index e706fa6c6..1f7913a72 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -20,9 +20,12 @@ class RehostTo(MultiHoster): def handlePremium(self, pyfile): self.download("http://rehost.to/process_download.php", get={'user': "cookie", - 'pass': self.account.getAccountData(self.user)['session'], + 'pass': self.account.getAccountInfo(self.user)['session'], 'dl' : pyfile.url}, disposition=True) getInfo = create_getInfo(RehostTo) + + +getInfo = create_getInfo(RehostTo) -- cgit v1.2.3 From f842d8baf6a7b7805459af4c4722dd1dd897690e Mon Sep 17 00:00:00 2001 From: Shuralon Date: Sun, 11 Jan 2015 14:27:16 +0100 Subject: [RehostTo] Fix --- module/plugins/hoster/RehostTo.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 1f7913a72..780b7e0f2 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -26,6 +26,3 @@ class RehostTo(MultiHoster): getInfo = create_getInfo(RehostTo) - - -getInfo = create_getInfo(RehostTo) -- cgit v1.2.3 From 5b31d8f20133cc575a101026c823f4d4e69621af Mon Sep 17 00:00:00 2001 From: Shuralon Date: Sun, 11 Jan 2015 14:31:01 +0100 Subject: [RehostTo] Fix version --- module/plugins/hoster/RehostTo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 780b7e0f2..28de35d08 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class RehostTo(MultiHoster): __name__ = "RehostTo" __type__ = "hoster" - __version__ = "0.20" + __version__ = "0.21" __pattern__ = r'https?://.*rehost\.to\..+' -- cgit v1.2.3