1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-07-27 07:38:30 +00:00

lstrip not strip

Authored by: bashonly
This commit is contained in:
bashonly 2025-07-12 16:56:51 -05:00
parent 82f4f60c9b
commit ce7e194645
No known key found for this signature in database
GPG Key ID: 783F096F253D15B0

View File

@ -1824,7 +1824,7 @@ def flatten(flight_data):
for f in flight_text.splitlines():
prefix, _, body = f.partition(':')
if body.startswith('[') and body.endswith(']') and re.fullmatch(r'[0-9a-f]{1,3}', prefix.strip()):
if body.startswith('[') and body.endswith(']') and re.fullmatch(r'[0-9a-f]{1,3}', prefix.lstrip()):
# The body isn't necessarily valid JSON, so this should always be non-fatal
flatten(self._parse_json(body, video_id, fatal=False, errnote=False))