From e82c2605e93325a8b6fa82c25694128a63239f41 Mon Sep 17 00:00:00 2001 From: bashonly Date: Thu, 27 Mar 2025 17:38:28 -0500 Subject: [PATCH] make it more clear that it is user error Authored by: bashonly --- yt_dlp/extractor/youtube/_video.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/youtube/_video.py b/yt_dlp/extractor/youtube/_video.py index 5f62e5730f..6e3e5ee23f 100644 --- a/yt_dlp/extractor/youtube/_video.py +++ b/yt_dlp/extractor/youtube/_video.py @@ -1952,7 +1952,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor): js_variant = self._configuration_arg('force_js_variant', [''])[0] if js_variant not in ('false', ''): if js_variant not in self._PLAYER_JS_VARIANT_MAP: - raise ExtractorError(f'Invalid JS variant: {js_variant}', expected=True) + raise ExtractorError( + f'Invalid JS variant name "{js_variant}" requested by extractor argument', expected=True) player_id = self._extract_player_info(player_url) self.write_debug(f'Forcing {js_variant} variant for player {player_id}') player_url = self._PLAYER_JS_VARIANT_MAP[js_variant].format(player_id)