1
0
mirror of https://github.com/l1ving/youtube-dl synced 2020-11-18 19:53:54 -08:00

Adding is_live to info dictionary of facebook videos

This commit is contained in:
Avichai Cohen 2019-04-02 16:22:54 +03:00
parent 93bb6b1bae
commit 343c86fa0b

View File

@ -218,6 +218,7 @@ class FacebookIE(InfoExtractor):
'ext': 'mp4', 'ext': 'mp4',
'title': '#ESLOne VoD - Birmingham Finals Day#1 Fnatic vs. @Evil Geniuses', 'title': '#ESLOne VoD - Birmingham Finals Day#1 Fnatic vs. @Evil Geniuses',
'uploader': 'ESL One Dota 2', 'uploader': 'ESL One Dota 2',
'is_live': False
}, },
'params': { 'params': {
'skip_download': True, 'skip_download': True,
@ -379,6 +380,8 @@ class FacebookIE(InfoExtractor):
if not video_data: if not video_data:
raise ExtractorError('Cannot parse data') raise ExtractorError('Cannot parse data')
is_live = video_data[0].get('is_broadcast', False) and video_data[0].get('is_live_stream', False)
formats = [] formats = []
for f in video_data: for f in video_data:
format_id = f['stream_type'] format_id = f['stream_type']
@ -442,6 +445,7 @@ class FacebookIE(InfoExtractor):
'timestamp': timestamp, 'timestamp': timestamp,
'thumbnail': thumbnail, 'thumbnail': thumbnail,
'view_count': view_count, 'view_count': view_count,
'is_live': is_live
} }
return webpage, info_dict return webpage, info_dict