- for entry in search_results_raw['value']['search'][key]['suggestions']:
- if self.netflix_session._is_size_key(key=entry) == False:
- if search_results_raw['value']['search'][key]['suggestions'][entry]['relatedvideos']['length'] > 0:
- has_search_results = True
+ if search_results_raw['value']['search'][key].get('suggestions', False) != False:
+ for entry in search_results_raw['value']['search'][key]['suggestions']:
+ if self.netflix_session._is_size_key(key=entry) == False:
+ if search_results_raw['value']['search'][key]['suggestions'][entry]['relatedvideos']['length'] > 0:
+ has_search_results = True