summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/BasePlugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/BasePlugin.py')
-rw-r--r--module/plugins/hoster/BasePlugin.py10
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