A feature-rich command-line audio/video downloader
[youtube] extractor-arg to show live dash formats
pukkandan57015a4a3f15
diff --git a/README.md b/README.mdindex 2c4bb8f351..9f8376f592 100644--- a/README.md+++ b/README.md@@ -1381,6 +1381,7 @@ The following extractors use this feature:* `skip`: `hls` or `dash` (or both) to skip download of the respective manifests* `player_client`: Clients to extract video data from. The main clients are `web`, `android`, `ios`, `mweb`. These also have `_music`, `_embedded`, `_agegate`, and `_creator` variants (Eg: `web_embedded`) (`mweb` has only `_agegate`). By default, `android,web` is used, but the agegate and creator variants are added as required for age-gated videos. Similarly the music variants are added for `music.youtube.com` urls. You can also use `all` to use all the clients* `player_skip`: `configs` - skip any requests for client configs and use defaults+ * `include_live_dash`: Include live dash formats (These formats don't download properly)* `comment_sort`: `top` or `new` (default) - choose comment sorting mode (on YouTube's side).* `max_comments`: maximum amount of comments to download (default all).* `max_comment_depth`: maximum depth for nested comments. YouTube supports depths 1 or 2 (default).diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.pyindex 46fa31a73d..d5813e2881 100644--- a/yt_dlp/extractor/youtube.py+++ b/yt_dlp/extractor/youtube.py@@ -2628,7 +2628,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor):yield dctskip_manifests = self._configuration_arg('skip')- get_dash = not is_live and 'dash' not in skip_manifests and self.get_param('youtube_include_dash_manifest', True)+ get_dash = (+ (not is_live or self._configuration_arg('include_live_dash'))+ and 'dash' not in skip_manifests and self.get_param('youtube_include_dash_manifest', True))get_hls = 'hls' not in skip_manifests and self.get_param('youtube_include_hls_manifest', True)def guess_quality(f):@@ -3458,7 +3460,7 @@ class YoutubeTabIE(YoutubeBaseInfoExtractor):}, {'url': 'https://www.youtube.com/channel/UCoMdktPbSTixAyNGwb-UYkQ/live','info_dict': {- 'id': 'FMtPN8yp5LU', # This will keep changing+ 'id': '3yImotZU3tw', # This will keep changing'ext': 'mp4','title': compat_str,'uploader': 'Sky News',diff --git a/yt_dlp/options.py b/yt_dlp/options.pyindex b5ddbeaff7..e704712825 100644--- a/yt_dlp/options.py+++ b/yt_dlp/options.py@@ -1367,7 +1367,7 @@ def parseOpts(overrideArguments=None):'--no-hls-split-discontinuity',dest='hls_split_discontinuity', action='store_false',help='Do not split HLS playlists to different formats at discontinuities such as ad breaks (default)')- _extractor_arg_parser = lambda key, vals='': (key.strip().lower(), [val.strip() for val in vals.split(',')])+ _extractor_arg_parser = lambda key, vals='': (key.strip().lower().replace('-', '_'), [val.strip() for val in vals.split(',')])extractor.add_option('--extractor-args',metavar='KEY:ARGS', dest='extractor_args', default={}, type='str',