summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-05-25 20:37:32 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-05-25 20:37:32 +0200
commitefee017fb2b3a4cac09233cd01d816d9100a5db5 (patch)
tree58635208703ae98e2359e160860f7ea7af68445f /module/plugins/hoster
parentRealdebridCom plugin (diff)
downloadpyload-efee017fb2b3a4cac09233cd01d816d9100a5db5.tar.xz
rehost plugin, fixed some account management issues
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/RealdebridCom.py2
-rw-r--r--module/plugins/hoster/RehostTo.py37
2 files changed, 38 insertions, 1 deletions
diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py
index dc5b9098b..5db81b713 100644
--- a/module/plugins/hoster/RealdebridCom.py
+++ b/module/plugins/hoster/RealdebridCom.py
@@ -24,7 +24,7 @@ class RealdebridCom(Hoster):
def process(self, pyfile):
if not self.account:
- self.log.error(_("Please enter your Real-debrid account"))
+ self.log.error(_("Please enter your Real-debrid account or deactivate this plugin"))
self.fail("No Real-debrid account provided")
self.log.debug("Real-Debrid: Old URL: %s" % pyfile.url)
diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py
new file mode 100644
index 000000000..2755facb7
--- /dev/null
+++ b/module/plugins/hoster/RehostTo.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import re
+from urllib import quote, unquote
+from module.plugins.Hoster import Hoster
+
+class RehostTo(Hoster):
+ __name__ = "RehostTo"
+ __version__ = "0.1"
+ __type__ = "hoster"
+
+ __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])
+
+ def setup(self):
+ self.chunkLimit = 3
+ self.resumeDownload = True
+
+ def process(self, pyfile):
+ if not self.account:
+ self.log.error(_("Please enter your rehost.to account or deactivate this plugin"))
+ self.fail("No rehost.to account provided")
+
+ data = self.account.getAccountInfo(self.user)
+ long_ses = data["long_ses"]
+
+ self.log.debug("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, ""))
+
+
+ self.download(new_url, disposition=True) \ No newline at end of file