From 04038a2cf0c4c2d9cc9a0c8e8bf9beb6426afae8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 10 Jul 2014 03:02:26 +0200 Subject: Use parseError instead PluginParseError + unified all download pattern attributes as LINK_PATTERN + removed some old patterns (not used anymore) + other code cosmetics --- module/plugins/hoster/BasePlugin.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/hoster/BasePlugin.py') diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 970ac8081..68b98e0a7 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -18,6 +18,7 @@ class BasePlugin(Hoster): __author_name__ = "RaNaN" __author_mail__ = "RaNaN@pyload.org" + def setup(self): self.chunkLimit = -1 self.resumeDownload = True -- cgit v1.2.3 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/BasePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/hoster/BasePlugin.py') diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 68b98e0a7..9206aaabd 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -56,7 +56,7 @@ class BasePlugin(Hoster): if server in servers: self.logDebug("Logging on to %s" % server) - self.req.addAuth(account.accounts[server]["password"]) + self.req.addAuth(account.accounts[server]['password']) else: for pwd in pyfile.package().password.splitlines(): if ":" in pwd: -- 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/BasePlugin.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/BasePlugin.py') diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 9206aaabd..839c4100a 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -from urlparse import urlparse from re import match, search from urllib import unquote +from urlparse import urlparse from module.network.HTTPRequest import BadHeader from module.plugins.Hoster import Hoster @@ -12,8 +12,10 @@ from module.utils import html_unescape, remove_chars class BasePlugin(Hoster): __name__ = "BasePlugin" __type__ = "hoster" - __pattern__ = r'^unmatchable$' __version__ = "0.19" + + __pattern__ = r'^unmatchable$' + __description__ = """Base Plugin when any other didnt fit""" __author_name__ = "RaNaN" __author_mail__ = "RaNaN@pyload.org" -- cgit v1.2.3 From bd642f4597382aedc4c2f1dd28795cc15f5477cd Mon Sep 17 00:00:00 2001 From: William Pickering Date: Sat, 30 Aug 2014 19:27:13 +0200 Subject: [BasePlugin] Don't unquote url header --- module/plugins/hoster/BasePlugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/hoster/BasePlugin.py') diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 839c4100a..54d789054 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/plugins/hoster/BasePlugin.py @@ -12,7 +12,7 @@ from module.utils import html_unescape, remove_chars class BasePlugin(Hoster): __name__ = "BasePlugin" __type__ = "hoster" - __version__ = "0.19" + __version__ = "0.20" __pattern__ = r'^unmatchable$' @@ -88,7 +88,7 @@ class BasePlugin(Hoster): self.logDebug("Location: " + header['location']) base = match(r'https?://[^/]+', url).group(0) if header['location'].startswith("http"): - url = unquote(header['location']) + url = header['location'] elif header['location'].startswith("/"): url = base + unquote(header['location']) else: -- cgit v1.2.3