mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-12-23 23:17:53 +01:00
[facebook] Improve error handling (#8572)
This commit is contained in:
parent
f66a3c7bc2
commit
cb64ccc715
@ -186,7 +186,7 @@ class FacebookIE(InfoExtractor):
|
|||||||
if not video_data:
|
if not video_data:
|
||||||
server_js_data = self._parse_json(self._search_regex(
|
server_js_data = self._parse_json(self._search_regex(
|
||||||
r'handleServerJS\(({.+})\);', webpage, 'server js data'), video_id)
|
r'handleServerJS\(({.+})\);', webpage, 'server js data'), video_id)
|
||||||
for item in server_js_data['instances']:
|
for item in server_js_data.get('instances', []):
|
||||||
if item[1][0] == 'VideoConfig':
|
if item[1][0] == 'VideoConfig':
|
||||||
video_data = video_data_list2dict(item[2][0]['videoData'])
|
video_data = video_data_list2dict(item[2][0]['videoData'])
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user