mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-07-27 13:54:14 +09:00
Youtube: Add broadcast start time (if it was a live stream)
Signed-off-by: Jon Doron <arilou@gmail.com>
This commit is contained in:
parent
a803582717
commit
8055132746
@ -1780,6 +1780,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
or parse_duration(search_meta('duration'))
|
or parse_duration(search_meta('duration'))
|
||||||
is_live = video_details.get('isLive')
|
is_live = video_details.get('isLive')
|
||||||
owner_profile_url = microformat.get('ownerProfileUrl')
|
owner_profile_url = microformat.get('ownerProfileUrl')
|
||||||
|
live_details = microformat.get('liveBroadcastDetails')
|
||||||
|
broadcast_start_timestamp = None
|
||||||
|
if live_details:
|
||||||
|
broadcast_start_timestamp = live_details.get('startTimestamp')
|
||||||
|
|
||||||
info = {
|
info = {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
@ -1809,6 +1813,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
'categories': [category] if category else None,
|
'categories': [category] if category else None,
|
||||||
'tags': keywords,
|
'tags': keywords,
|
||||||
'is_live': is_live,
|
'is_live': is_live,
|
||||||
|
'broadcast_start_timestamp': broadcast_start_timestamp,
|
||||||
}
|
}
|
||||||
|
|
||||||
pctr = try_get(
|
pctr = try_get(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user