summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-11-26 00:43:48 +0100
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-11-26 00:43:48 +0100
commit821389cc5d526741a0a03f8fc83beccd1e90e530 (patch)
tree20fbc6d4f46d7df57dabd06bf5e886759f3af0d4 /module
parentMerge pull request #2153 from k1l/patch-1 (diff)
parentFix extraction of location url from header (diff)
downloadpyload-821389cc5d526741a0a03f8fc83beccd1e90e530.tar.xz
Merge pull request #2162 from joberreiter/patch-6
[ShareLinksBiz] Fix extraction of location url from header
Diffstat (limited to 'module')
-rw-r--r--module/plugins/crypter/ShareLinksBiz.py9
1 files changed, 7 insertions, 2 deletions
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<ID>_?\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)