projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ca478d
)
[facebook] Improve video selection (closes #11390)
author
Sergey M․
<dstftw@gmail.com>
Sat, 10 Dec 2016 18:22:01 +0000
(
01:22
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 10 Dec 2016 18:22:01 +0000
(
01:22
+0700)
youtube_dl/extractor/facebook.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/facebook.py
b/youtube_dl/extractor/facebook.py
index b4d38e5c258b830e192bcfa2639f2074d9217434..4de21baeb9f596dfb538d8451620d38a795cc9f6 100644
(file)
--- 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: