[youku] Remove KeyError try-except
Change-Id: Ic46327905cbef1356b7b12d5eb3db5d9746ca338
This commit is contained in:
parent
7b17cbc153
commit
f824c42a6c
@ -253,11 +253,10 @@ class YoukuShowIE(InfoExtractor):
|
|||||||
|
|
||||||
def _extract_entries(self, playlist_data_url, show_id, note, query):
|
def _extract_entries(self, playlist_data_url, show_id, note, query):
|
||||||
query['callback'] = 'cb'
|
query['callback'] = 'cb'
|
||||||
try:
|
|
||||||
playlist_data = self._download_json(
|
playlist_data = self._download_json(
|
||||||
playlist_data_url, show_id, query=query, note=note,
|
playlist_data_url, show_id, query=query, note=note,
|
||||||
transform_source=lambda s: js_to_json(strip_jsonp(s)))['html']
|
transform_source=lambda s: js_to_json(strip_jsonp(s))).get('html')
|
||||||
except KeyError:
|
if playlist_data is None:
|
||||||
return [None, None]
|
return [None, None]
|
||||||
drama_list = (get_element_by_class('p-drama-grid', playlist_data) or
|
drama_list = (get_element_by_class('p-drama-grid', playlist_data) or
|
||||||
get_element_by_class('p-drama-half-row', playlist_data))
|
get_element_by_class('p-drama-half-row', playlist_data))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user