diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index 53023b642..893b7f41f 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -1794,7 +1794,7 @@ def flatten(flight_data): if not isinstance(data, dict): return children = data.pop('children', None) - if data and name and name[0] == '$': + if data and isinstance(name, str) and name[:1] == '$': # It is useful hydration JSON data nextjs_data.append(data) flatten(children)