From 7b8c458cca7d21a029620f98e453f746fce69cd1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 16:10:01 +0200 Subject: Prefer single quote for dict key name --- 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 94e53520a..79c06f863 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -26,7 +26,7 @@ class RehostTo(Hoster): self.fail("No rehost.to account provided") data = self.account.getAccountInfo(self.user) - long_ses = data["long_ses"] + long_ses = data['long_ses'] self.logDebug("Rehost.to: Old URL: %s" % pyfile.url) new_url = "http://rehost.to/process_download.php?user=cookie&pass=%s&dl=%s" % (long_ses, quote(pyfile.url, "")) -- 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/RehostTo.py | 6 +++++- 1 file changed, 5 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 79c06f863..98fb10d94 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -1,18 +1,22 @@ # -*- coding: utf-8 -*- from urllib import quote, unquote + from module.plugins.Hoster import Hoster class RehostTo(Hoster): __name__ = "RehostTo" - __version__ = "0.13" __type__ = "hoster" + __version__ = "0.13" + __pattern__ = r'https?://.*rehost.to\..*' + __description__ = """Rehost.com hoster plugin""" __author_name__ = "RaNaN" __author_mail__ = "RaNaN@pyload.org" + def getFilename(self, url): return unquote(url.rsplit("/", 1)[1]) -- 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/RehostTo.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index 98fb10d94..e1ee3aeb9 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -13,8 +13,7 @@ class RehostTo(Hoster): __pattern__ = r'https?://.*rehost.to\..*' __description__ = """Rehost.com hoster plugin""" - __author_name__ = "RaNaN" - __author_mail__ = "RaNaN@pyload.org" + __authors__ = [("RaNaN", "RaNaN@pyload.org")] def getFilename(self, url): -- 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/RehostTo.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index e1ee3aeb9..b4f8f968b 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -13,6 +13,7 @@ class RehostTo(Hoster): __pattern__ = r'https?://.*rehost.to\..*' __description__ = """Rehost.com hoster plugin""" + __license__ = "GPLv3" __authors__ = [("RaNaN", "RaNaN@pyload.org")] -- 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/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 b4f8f968b..e1f719c19 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -10,7 +10,7 @@ class RehostTo(Hoster): __type__ = "hoster" __version__ = "0.13" - __pattern__ = r'https?://.*rehost.to\..*' + __pattern__ = r'https?://.*rehost\.to\..*' __description__ = """Rehost.com hoster plugin""" __license__ = "GPLv3" -- 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/RehostTo.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/hoster/RehostTo.py') diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index e1f719c19..80465724d 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -20,10 +20,12 @@ class RehostTo(Hoster): def getFilename(self, url): return unquote(url.rsplit("/", 1)[1]) + def setup(self): 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") -- 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/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 80465724d..67cb882d4 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -29,7 +29,7 @@ class RehostTo(Hoster): 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") + self.fail(_("No rehost.to account provided")) data = self.account.getAccountInfo(self.user) long_ses = data['long_ses'] -- 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/RehostTo.py | 8 ++++---- 1 file changed, 4 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 67cb882d4..07755cb9c 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -6,15 +6,15 @@ from module.plugins.Hoster import Hoster class RehostTo(Hoster): - __name__ = "RehostTo" - __type__ = "hoster" + __name__ = "RehostTo" + __type__ = "hoster" __version__ = "0.13" __pattern__ = r'https?://.*rehost\.to\..*' __description__ = """Rehost.com hoster plugin""" - __license__ = "GPLv3" - __authors__ = [("RaNaN", "RaNaN@pyload.org")] + __license__ = "GPLv3" + __authors__ = [("RaNaN", "RaNaN@pyload.org")] def getFilename(self, url): -- cgit v1.2.3 From 67587fbe0335cacfde28a86ba729b9d567ce1da7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 7 Dec 2014 00:27:18 +0100 Subject: Plugin code cosmetics (3) --- module/plugins/hoster/RehostTo.py | 5 +++-- 1 file changed, 3 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 07755cb9c..7cde01025 100644 --- a/module/plugins/hoster/RehostTo.py +++ b/module/plugins/hoster/RehostTo.py @@ -35,9 +35,10 @@ class RehostTo(Hoster): long_ses = data['long_ses'] self.logDebug("Rehost.to: Old URL: %s" % pyfile.url) - new_url = "http://rehost.to/process_download.php?user=cookie&pass=%s&dl=%s" % (long_ses, quote(pyfile.url, "")) #raise timeout to 2min self.req.setOption("timeout", 120) - self.download(new_url, disposition=True) + self.download("http://rehost.to/process_download.php", + get={'user': "cookie", 'pass': long_ses, 'dl': quote(pyfile.url, "")}, + disposition=True) -- cgit v1.2.3 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