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:
parent
82f4f60c9b
commit
ce7e194645
@ -1824,7 +1824,7 @@ def flatten(flight_data):
|
|||||||
|
|
||||||
for f in flight_text.splitlines():
|
for f in flight_text.splitlines():
|
||||||
prefix, _, body = f.partition(':')
|
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
|
# 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))
|
flatten(self._parse_json(body, video_id, fatal=False, errnote=False))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user