]> jfr.im git - yt-dlp.git/commitdiff
[youtube] Show if video was a live stream in info
authorpukkandan <redacted>
Sun, 21 Feb 2021 21:41:24 +0000 (03:11 +0530)
committerpukkandan <redacted>
Sun, 21 Feb 2021 21:41:24 +0000 (03:11 +0530)
README.md
youtube_dlc/extractor/common.py
youtube_dlc/extractor/youtube.py

index 6207a652e29f03ba7bdbe54d2400b486006aafe3..2bcab6e0a54b0cd8901d639a6a84dc09b66994fe 100644 (file)
--- a/README.md
+++ b/README.md
@@ -801,6 +801,7 @@ # OUTPUT TEMPLATE
  - `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
index ae1b34912c5e03e84fcabfc1a9098838851797ff..2c4564929e137c335d0c11cc9b82eb7c1432425c 100644 (file)
@@ -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
index 8fc3706df739c56338dde8493df2363ba00e1c35..2f02f3afc2708883a92a0e11c9ad3c3cb0e1a6cb 100644 (file)
@@ -1757,6 +1757,7 @@ def feed_entry(name):
             'tags': keywords,
             'is_live': is_live,
             'playable_in_embed': playability_status.get('playableInEmbed'),
+            'was_live': video_details.get('isLiveContent')
         }
 
         pctr = try_get(