diff options
Diffstat (limited to 'module/plugins/hoster/RehostTo.py')
-rw-r--r-- | module/plugins/hoster/RehostTo.py | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py index b1d0c6e93..9c07364ec 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 +import urllib from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo @@ -8,34 +8,21 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class RehostTo(MultiHoster): __name__ = "RehostTo" __type__ = "hoster" - __version__ = "0.16" + __version__ = "0.21" - __pattern__ = r'https?://.*rehost\.to\..*' + __pattern__ = r'https?://.*rehost\.to\..+' + __config__ = [("use_premium", "bool", "Use premium account if available", True)] - __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 setup(self): - self.chunkLimit = 1 - self.resumeDownload = True - - - def handlePremium(self): - data = self.account.getAccountInfo(self.user) - long_ses = data['long_ses'] - - #raise timeout to 2min - self.req.setOption("timeout", 120) - - self.link = True + def handlePremium(self, pyfile): self.download("http://rehost.to/process_download.php", - get={'user': "cookie", 'pass': long_ses, 'dl': quote(self.pyfile.url, "")}, + get={'user': "cookie", + 'pass': self.account.getAccountInfo(self.user)['session'], + 'dl' : pyfile.url}, disposition=True) |