summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar Jochen Oberreiter <joberreiter@users.noreply.github.com> 2015-08-14 08:14:30 +0200
committerGravatar Jochen Oberreiter <joberreiter@users.noreply.github.com> 2015-08-14 08:14:30 +0200
commit7943a306eb794e826d5ffeb54218f350fbc8e34f (patch)
treec138af447f76645f21cb6041ebfd409759e86fe7 /module/plugins
parentFix https://github.com/pyload/pyload/issues/1707 (diff)
downloadpyload-7943a306eb794e826d5ffeb54218f350fbc8e34f.tar.xz
Check if search has returned a result
Fixes #1753
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/crypter/ShareLinksBiz.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py
index 6fbe59b38..da91cc065 100644
--- a/module/plugins/crypter/ShareLinksBiz.py
+++ b/module/plugins/crypter/ShareLinksBiz.py
@@ -68,8 +68,12 @@ class ShareLinksBiz(Crypter):
url = pyfile.url
if 's2l.biz' in url:
url = self.load(url, just_header=True)['location']
- self.base_url = "http://www.%s.biz" % re.match(self.__pattern__, url).group(1)
- self.file_id = re.match(self.__pattern__, url).group('ID')
+ if re.match(self.__pattern__, url):
+ self.base_url = "http://www.%s.biz" % re.match(self.__pattern__, url).group(1)
+ self.file_id = re.match(self.__pattern__, url).group('ID')
+ else:
+ self.log_debug("Could not initialize, URL [%s] does not match pattern [%s]" % (url, self.__pattern__))
+ self.fail("Unsupported download link")
self.package = pyfile.package()