diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-12-11 01:22:01 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-12-11 01:22:01 +0700 |
commit | 19b4900b7b33047e439ae9c960f1a8516ecf3ff8 (patch) | |
tree | 0c3100b3a3335d4d233edc8c2f6bcda293b1cee6 /youtube_dl | |
parent | 6ca478d44a59b6ed2567d26c2f857060cd41e3df (diff) |
[facebook] Improve video selection (closes #11390)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/facebook.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube_dl/extractor/facebook.py b/youtube_dl/extractor/facebook.py index b4d38e5c2..4de21baeb 100644 --- a/youtube_dl/extractor/facebook.py +++ b/youtube_dl/extractor/facebook.py @@ -244,8 +244,10 @@ class FacebookIE(InfoExtractor): r'handleServerJS\(({.+})(?:\);|,")', webpage, 'server js data', default='{}'), video_id) for item in server_js_data.get('instances', []): if item[1][0] == 'VideoConfig': - video_data = item[2][0]['videoData'] - break + video_item = item[2][0] + if video_item.get('video_id') == video_id: + video_data = video_item['videoData'] + break if not video_data: if not fatal_if_no_video: |