summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/crypter/XFileSharingFolder.py4
-rw-r--r--module/plugins/hoster/XFileSharing.py4
-rw-r--r--module/plugins/internal/Hoster.py11
-rw-r--r--module/plugins/internal/MultiCrypter.py4
-rw-r--r--module/plugins/internal/MultiHoster.py6
-rw-r--r--module/plugins/internal/utils.py8
6 files changed, 16 insertions, 21 deletions
diff --git a/module/plugins/crypter/XFileSharingFolder.py b/module/plugins/crypter/XFileSharingFolder.py
index 0c6befb91..8f51c00be 100644
--- a/module/plugins/crypter/XFileSharingFolder.py
+++ b/module/plugins/crypter/XFileSharingFolder.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo
class XFileSharingFolder(XFSCrypter):
__name__ = "XFileSharingFolder"
__type__ = "crypter"
- __version__ = "0.17"
+ __version__ = "0.18"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(?:\w+\.)*(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,63}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:user|folder)s?/\w+'
@@ -23,7 +23,7 @@ class XFileSharingFolder(XFSCrypter):
def _log(self, level, plugintype, pluginname, messages):
messages = (self.PLUGIN_NAME,) + messages
- return self.plugin._log(level, plugintype, pluginname, messages)
+ return super(XFileSharingFolder, self)._log(level, plugintype, pluginname, messages)
def init(self):
diff --git a/module/plugins/hoster/XFileSharing.py b/module/plugins/hoster/XFileSharing.py
index 89b58bb7f..01b2b0d6c 100644
--- a/module/plugins/hoster/XFileSharing.py
+++ b/module/plugins/hoster/XFileSharing.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class XFileSharing(XFSHoster):
__name__ = "XFileSharing"
__type__ = "hoster"
- __version__ = "0.57"
+ __version__ = "0.58"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(?:\w+\.)*(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,63}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:embed-)?\w{12}(?:\W|$)'
@@ -24,7 +24,7 @@ class XFileSharing(XFSHoster):
def _log(self, level, plugintype, pluginname, messages):
messages = (self.PLUGIN_NAME,) + messages
- return self.plugin._log(level, plugintype, pluginname, messages)
+ return super(XFileSharing, self)._log(level, plugintype, pluginname, messages)
def init(self):
diff --git a/module/plugins/internal/Hoster.py b/module/plugins/internal/Hoster.py
index 13d7afad8..8f76b6c45 100644
--- a/module/plugins/internal/Hoster.py
+++ b/module/plugins/internal/Hoster.py
@@ -13,7 +13,7 @@ from module.plugins.internal.utils import encode, exists, fixurl, fs_join, parse
class Hoster(Base):
__name__ = "Hoster"
__type__ = "hoster"
- __version__ = "0.39"
+ __version__ = "0.40"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -98,7 +98,7 @@ class Hoster(Base):
self.restart(premium=False)
else:
- raise Fail(e)
+ raise Fail(str(e))
def isdownload(self, url, resume=None, redirect=True):
@@ -176,16 +176,11 @@ class Hoster(Base):
self.log_debug("DOWNLOAD URL " + url,
*["%s=%s" % (key, val) for key, val in locals().items() if key not in ("self", "url", "_[1]")])
- dl_url = self.isdownload(url, resume)
+ dl_url = self.fixurl(url)
dl_basename = parse_name(self.pyfile.name)
self.pyfile.name = dl_basename
- if not dl_url:
- self.error("Invalid download url")
-
-
-
self.captcha.correct()
if self.pyload.config.get("download", "skip_existing"):
diff --git a/module/plugins/internal/MultiCrypter.py b/module/plugins/internal/MultiCrypter.py
index 916ac9cdd..106875f61 100644
--- a/module/plugins/internal/MultiCrypter.py
+++ b/module/plugins/internal/MultiCrypter.py
@@ -6,7 +6,7 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter
class MultiCrypter(SimpleCrypter):
__name__ = "MultiCrypter"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -26,4 +26,4 @@ class MultiCrypter(SimpleCrypter):
def _log(self, level, plugintype, pluginname, messages):
messages = (self.PLUGIN_NAME,) + messages
- return self.plugin._log(level, plugintype, pluginname, messages)
+ return super(MultiCrypter, self)._log(level, plugintype, pluginname, messages)
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py
index 8baa577f9..6fa28d82d 100644
--- a/module/plugins/internal/MultiHoster.py
+++ b/module/plugins/internal/MultiHoster.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, r
class MultiHoster(SimpleHoster):
__name__ = "MultiHoster"
__type__ = "hoster"
- __version__ = "0.54"
+ __version__ = "0.55"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -36,7 +36,7 @@ class MultiHoster(SimpleHoster):
def _log(self, level, plugintype, pluginname, messages):
messages = (self.PLUGIN_NAME,) + messages
- return self.plugin._log(level, plugintype, pluginname, messages)
+ return super(MultiHoster, self)._log(level, plugintype, pluginname, messages)
def setup(self):
@@ -86,7 +86,7 @@ class MultiHoster(SimpleHoster):
self.restart(_("Revert to original hoster plugin"))
else:
- raise Fail(e)
+ raise Fail(str(e))
def handle_premium(self, pyfile):
diff --git a/module/plugins/internal/utils.py b/module/plugins/internal/utils.py
index 651ccce78..723690f39 100644
--- a/module/plugins/internal/utils.py
+++ b/module/plugins/internal/utils.py
@@ -24,7 +24,7 @@ except ImportError:
class utils(object):
__name__ = "utils"
__type__ = "plugin"
- __version__ = "0.02"
+ __version__ = "0.03"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -371,9 +371,9 @@ def replace_patterns(value, rules):
return value
-#@TODO: Remove in 0.4.10 and fix CookieJar.setCookie
-def set_cookie(cj, domain, name, value):
- return cj.setCookie(domain, name, encode(value))
+#@TODO: Remove in 0.4.10 and fix exp in CookieJar.setCookie
+def set_cookie(cj, domain, name, value, path='/', exp=time.time() + 180 * 24 * 3600):
+ return cj.setCookie(encode(domain), encode(name), encode(value), encode(path), int(exp))
def set_cookies(cj, cookies):