diff --git a/plugins/youtube.py b/plugins/youtube.py index 404f586..8931f4b 100644 --- a/plugins/youtube.py +++ b/plugins/youtube.py @@ -75,7 +75,7 @@ def youtube(inp): if 'error' in j: return 'error while performing the search' - if j['data']['totalItems'] == 0: + if j['data']['totalItems'] == 0 or 'items' not in j['data']: return 'no results found' vid_id = j['data']['items'][0]['id']