summaryrefslogtreecommitdiff
path: root/searx/engines/youtube.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/youtube.py')
-rw-r--r--searx/engines/youtube.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/youtube.py b/searx/engines/youtube.py
index 59f07c574..1375538a8 100644
--- a/searx/engines/youtube.py
+++ b/searx/engines/youtube.py
@@ -57,7 +57,7 @@ def response(resp):
url = [x['href'] for x in result['link'] if x['type'] == 'text/html']
if not url:
- return
+ continue
# remove tracking
url = url[0].replace('feature=youtube_gdata', '')
@@ -73,7 +73,7 @@ def response(resp):
pubdate = result['published']['$t']
publishedDate = parser.parse(pubdate)
- if result['media$group']['media$thumbnail']:
+ if 'media$thumbnail' in result['media$group']:
thumbnail = result['media$group']['media$thumbnail'][0]['url']
content = result['content']['$t']