summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/SimpleHoster.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-20 01:23:33 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-20 01:23:33 +0100
commit8f45ccee3c26f991738288805963a5961cd68267 (patch)
tree254739596a454861577ae3250a0f2fa87c3a2537 /module/plugins/internal/SimpleHoster.py
parentFix plugin filename case (diff)
downloadpyload-8f45ccee3c26f991738288805963a5961cd68267.tar.xz
[SimpleHoster] Improve downloadLink routine
Diffstat (limited to 'module/plugins/internal/SimpleHoster.py')
-rw-r--r--module/plugins/internal/SimpleHoster.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index d55ed6f99..78f5e531d 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -219,7 +219,7 @@ def secondsToMidnight(gmt=0):
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "1.04"
+ __version__ = "1.05"
__pattern__ = r'^unmatchable$'
@@ -467,6 +467,12 @@ class SimpleHoster(Hoster):
def downloadLink(self, link):
if link and isinstance(link, basestring):
self.correctCaptcha()
+
+ if not urlparse(link).scheme:
+ url_p = urlparse(self.pyfile.url)
+ baseurl = "%s://%s" % (url_p.scheme, url_p.netloc)
+ link = urljoin(baseurl, link)
+
self.download(link, disposition=False) #@TODO: Set `disposition=True` in 0.4.10