diff --git a/yt_dlp/extractor/youtube.py b/yt_dlp/extractor/youtube.py index 2b026ef056..e69373ba2f 100644 --- a/yt_dlp/extractor/youtube.py +++ b/yt_dlp/extractor/youtube.py @@ -3280,7 +3280,7 @@ def extract_nsig(s): except Exception as e: raise JSInterpreter.Exception(traceback.format_exc(), cause=e) - if ret.startswith('enhanced_except_') or ret.endswith(f'_w8_{s}'): + if ret.startswith('enhanced_except_') or ret.endswith(s): raise JSInterpreter.Exception('Signature function returned an exception') return ret