diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-09-07 23:40:50 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-09-14 10:58:42 +0200 |
commit | 887ad58e4c6c20b992311bbdf931bcd18e73d384 (patch) | |
tree | f31beb241bacca0bfea4c1acc4e9ace813755cef /module/plugins/hoster/BasePlugin.py | |
parent | [AccountManager] Fixed #733 (diff) | |
parent | [File4safe] distributing LINK_PATTERN (diff) | |
download | pyload-887ad58e4c6c20b992311bbdf931bcd18e73d384.tar.xz |
Merge branch 'stable' into 0.4.10
Conflicts:
module/plugins/Account.py
module/plugins/AccountManager.py
module/plugins/Hook.py
module/plugins/OCR.py
module/plugins/Plugin.py
module/plugins/PluginManager.py
module/plugins/ReCaptcha.py
module/plugins/accounts/Ftp.py
module/plugins/accounts/Http.py
module/plugins/internal/MultiHoster.py
module/plugins/ocr/GigasizeCom.py
module/plugins/ocr/LinksaveIn.py
module/plugins/ocr/NetloadIn.py
module/plugins/ocr/ShareonlineBiz.py
Diffstat (limited to 'module/plugins/hoster/BasePlugin.py')
-rw-r--r-- | module/plugins/hoster/BasePlugin.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 970ac8081..54d789054 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,12 +12,15 @@ from module.utils import html_unescape, remove_chars class BasePlugin(Hoster): __name__ = "BasePlugin" __type__ = "hoster" + __version__ = "0.20" + __pattern__ = r'^unmatchable$' - __version__ = "0.19" + __description__ = """Base Plugin when any other didnt fit""" __author_name__ = "RaNaN" __author_mail__ = "RaNaN@pyload.org" + def setup(self): self.chunkLimit = -1 self.resumeDownload = True @@ -55,7 +58,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: @@ -85,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: |