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:00:50 +0200 |
commit | 8c5af8995b5d77f6d161d18f0812ee7aa2d141b5 (patch) | |
tree | d95294206d5968b1e434608232b92a82adc1449e /module/plugins | |
parent | Putlocker: allow multiDL and chunked downloads even in free downloads (diff) | |
download | pyload-8c5af8995b5d77f6d161d18f0812ee7aa2d141b5.tar.xz |
BasePlugin: fixed #209
Diffstat (limited to 'module/plugins')
-rw-r--r-- | module/plugins/hoster/BasePlugin.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py index 332921dc4..2bdfda7c4 100644 --- a/module/plugins/hoster/BasePlugin.py +++ b/module/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 didnt fit""" __author_name__ = ("RaNaN") __author_mail__ = ("RaNaN@pyload.org") @@ -83,7 +83,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 |