aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Krausse <benjamin@ambcr.net>2023-12-11 17:52:59 -0600
committerbashonly <bashonly@protonmail.com>2023-12-11 17:57:41 -0600
commite370f9ec36972d06100a3db893b397bfc1b07b4d (patch)
tree590a0a42f122dde3a9ee9d3b1deff55a6b051d1c
parentb1a1ec1540605d2ea7abdb63336ffb1c56bf6316 (diff)
[ie] Add `media_type` field
Authored by: trainman261
-rw-r--r--README.md1
-rw-r--r--yt_dlp/extractor/common.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/README.md b/README.md
index 78d4799a1..06aceec02 100644
--- a/README.md
+++ b/README.md
@@ -1333,6 +1333,7 @@ The available fields are:
- `was_live` (boolean): Whether this video was originally a live stream
- `playable_in_embed` (string): Whether this video is allowed to play in embedded players on other sites
- `availability` (string): Whether the video is "private", "premium_only", "subscriber_only", "needs_auth", "unlisted" or "public"
+ - `media_type` (string): The type of media as classified by the site, e.g. "episode", "clip", "trailer"
- `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
- `extractor` (string): Name of the extractor
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index b179f4038..af534775f 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -382,6 +382,7 @@ class InfoExtractor:
'private', 'premium_only', 'subscriber_only', 'needs_auth',
'unlisted' or 'public'. Use 'InfoExtractor._availability'
to set it
+ media_type: The type of media as classified by the site, e.g. "episode", "clip", "trailer"
_old_archive_ids: A list of old archive ids needed for backward compatibility
_format_sort_fields: A list of fields to use for sorting formats
__post_extractor: A function to be called just before the metadata is