Browse Source

[facebook] Improve error handling (#8572)

master
Yen Chi Hsuan 8 years ago
parent
commit
cb64ccc715
1 changed files with 1 additions and 1 deletions
  1. 2
      youtube_dl/extractor/facebook.py

2
youtube_dl/extractor/facebook.py

@ -186,7 +186,7 @@ class FacebookIE(InfoExtractor):
if not video_data:
server_js_data = self._parse_json(self._search_regex(
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':
video_data = video_data_list2dict(item[2][0]['videoData'])
break

Loading…
Cancel
Save