From 6f51aabc93339a5385422ca1adbf8237a4454abd Mon Sep 17 00:00:00 2001 From: Jochen Oberreiter Date: Fri, 13 Nov 2015 15:07:43 +0100 Subject: Fix extraction of location url from header --- module/plugins/crypter/ShareLinksBiz.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'module') diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index e359bbeab..80aeb430a 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -11,7 +11,7 @@ from module.plugins.internal.Crypter import Crypter, create_getInfo class ShareLinksBiz(Crypter): __name__ = "ShareLinksBiz" __type__ = "crypter" - __version__ = "1.20" + __version__ = "1.21" __status__ = "testing" __pattern__ = r'http://(?:www\.)?(share-links|s2l)\.biz/(?P_?\w+)' @@ -71,7 +71,12 @@ class ShareLinksBiz(Crypter): url = pyfile.url if 's2l.biz' in url: - url = self.load(url, just_header=True)['location'] + header = self.load(url, just_header=True) + + if not 'location' in header: + self.fail(_("Unable to initialize download")) + else: + url = header.get('location') if re.match(self.__pattern__, url): self.base_url = "http://www.%s.biz" % re.match(self.__pattern__, url).group(1) -- cgit v1.2.3