aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan@gmail.com>2021-02-22 03:11:24 +0530
committerpukkandan <pukkandan@gmail.com>2021-02-22 03:11:24 +0530
commitf76ede8ee407fcaf19d2db2d031711e070749456 (patch)
treeeab52ad3f43cb556023604859c8f0a8dd8ef7a61
parente094cec18c4c7f17396fe6a946c497b5048863c6 (diff)
downloadhypervideo-pre-f76ede8ee407fcaf19d2db2d031711e070749456.tar.lz
hypervideo-pre-f76ede8ee407fcaf19d2db2d031711e070749456.tar.xz
hypervideo-pre-f76ede8ee407fcaf19d2db2d031711e070749456.zip
[youtube] Show if video was a live stream in info
-rw-r--r--README.md1
-rw-r--r--youtube_dlc/extractor/common.py2
-rw-r--r--youtube_dlc/extractor/youtube.py1
3 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md
index 6207a652e..2bcab6e0a 100644
--- a/README.md
+++ b/README.md
@@ -801,6 +801,7 @@ The available fields are:
- `comment_count` (numeric): Number of comments on the video
- `age_limit` (numeric): Age restriction for the video (years)
- `is_live` (boolean): Whether this video is a live stream or a fixed-length video
+ - `was_live` (boolean): Whether this video was originally a live stream
- `start_time` (numeric): Time in seconds where the reproduction should start, as specified in the URL
- `end_time` (numeric): Time in seconds where the reproduction should end, as specified in the URL
- `format` (string): A human-readable description of the format
diff --git a/youtube_dlc/extractor/common.py b/youtube_dlc/extractor/common.py
index ae1b34912..2c4564929 100644
--- a/youtube_dlc/extractor/common.py
+++ b/youtube_dlc/extractor/common.py
@@ -280,6 +280,8 @@ class InfoExtractor(object):
tags: A list of tags assigned to the video, e.g. ["sweden", "pop music"]
is_live: True, False, or None (=unknown). Whether this video is a
live stream that goes on instead of a fixed-length video.
+ was_live: True, False, or None (=unknown). Whether this video was
+ originally a live stream.
start_time: Time in seconds where the reproduction should start, as
specified in the URL.
end_time: Time in seconds where the reproduction should end, as
diff --git a/youtube_dlc/extractor/youtube.py b/youtube_dlc/extractor/youtube.py
index 8fc3706df..2f02f3afc 100644
--- a/youtube_dlc/extractor/youtube.py
+++ b/youtube_dlc/extractor/youtube.py
@@ -1757,6 +1757,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
'tags': keywords,
'is_live': is_live,
'playable_in_embed': playability_status.get('playableInEmbed'),
+ 'was_live': video_details.get('isLiveContent')
}
pctr = try_get(