summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/XFSHoster.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-25 00:27:21 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-25 00:27:21 +0100
commitbe322927f8bedbe86e801326651bd548eeda1dd3 (patch)
treef7eccca505cc96c983b66bb963b85d2c52159020 /module/plugins/internal/XFSHoster.py
parentFree XFS Premium chunked downloads. (diff)
downloadpyload-be322927f8bedbe86e801326651bd548eeda1dd3.tar.xz
[BasePlugin] Fix https://github.com/pyload/pyload/issues/1073
Diffstat (limited to 'module/plugins/internal/XFSHoster.py')
-rw-r--r--module/plugins/internal/XFSHoster.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py
index c6ec5faff..fbbb37b37 100644
--- a/module/plugins/internal/XFSHoster.py
+++ b/module/plugins/internal/XFSHoster.py
@@ -15,7 +15,7 @@ from module.utils import html_unescape
class XFSHoster(SimpleHoster):
__name__ = "XFSHoster"
__type__ = "hoster"
- __version__ = "0.39"
+ __version__ = "0.40"
__pattern__ = r'^unmatchable$'
@@ -88,12 +88,16 @@ class XFSHoster(SimpleHoster):
self.directDL = self.premium
- def downloadLink(self, link):
+ def downloadLink(self, link, disposition=False): #@TODO: Set `disposition=True` in 0.4.10
if link and isinstance(link, basestring):
- if self.captcha:
- self.correctCaptcha()
+ self.correctCaptcha()
- self.download(link, ref=True, cookies=True, disposition=False) #@TODO: Set `disposition=True` in 0.4.10
+ 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, ref=False, disposition=disposition)
elif self.errmsg:
if 'captcha' in self.errmsg: