diff options
author | Stefano <l.stickell@yahoo.it> | 2013-08-02 21:00:50 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-08-02 21:43:35 +0200 |
commit | fbec95764feb18faad52347b2e0a5b9efa572e15 (patch) | |
tree | f37a24cafd151d5ed5ce5fd50764b2cfb802762b /pyload | |
parent | fixed aborting downloads (diff) | |
download | pyload-fbec95764feb18faad52347b2e0a5b9efa572e15.tar.xz |
BasePlugin: fixed #208
(cherry picked from commit 8c5af8995b5d77f6d161d18f0812ee7aa2d141b5)
Conflicts:
pyload/plugins/hoster/BasePlugin.py
Diffstat (limited to 'pyload')
-rw-r--r-- | pyload/plugins/hoster/BasePlugin.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pyload/plugins/hoster/BasePlugin.py b/pyload/plugins/hoster/BasePlugin.py index 85d3c8ed6..b6d208f99 100644 --- a/pyload/plugins/hoster/BasePlugin.py +++ b/pyload/plugins/hoster/BasePlugin.py @@ -13,7 +13,7 @@ class BasePlugin(Hoster): __name__ = "BasePlugin" __type__ = "hoster" __pattern__ = r"^unmatchable$" - __version__ = "0.18" + __version__ = "0.19" __description__ = """Base Plugin when any other didn't fit""" __author_name__ = ("RaNaN") __author_mail__ = ("RaNaN@pyload.org") @@ -82,7 +82,13 @@ class BasePlugin(Hoster): if 'location' in header: self.logDebug("Location: " + header['location']) - url = unquote(header['location']) + base = search(r'https?://[^/]+', url).group(0) + if header['location'].startswith("http"): + url = unquote(header['location']) + elif header['location'].startswith("/"): + url = base + unquote(header['location']) + else: + url = '%s/%s' % (base, unquote(header['location'])) else: break |