1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-07-23 21:58:29 +00:00

fullmatch the name

This commit is contained in:
bashonly 2025-07-12 23:04:49 +00:00 committed by GitHub
parent 1fc012a0bf
commit 75d00c38e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1797,7 +1797,7 @@ def flatten(flight_data):
if not isinstance(data, dict):
return
children = data.pop('children', None)
if data and isinstance(name, str) and name.startswith('$L'):
if data and isinstance(name, str) and re.fullmatch(r'\$L[0-9a-f]+', name):
# It is useful hydration JSON data
nextjs_data[name[2:]] = data
flatten(children)