From adb148358ed49a73e14bc7092259b76cf73dac83 Mon Sep 17 00:00:00 2001 From: bashonly Date: Tue, 30 Apr 2024 17:52:25 -0500 Subject: [PATCH] [utils] `read_batch_urls`: Fix deprecated `re.split` positional arg (3.13) Authored by: bashonly --- yt_dlp/utils/_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py index b63766912..aa7bf2ce4 100644 --- a/yt_dlp/utils/_utils.py +++ b/yt_dlp/utils/_utils.py @@ -2522,7 +2522,7 @@ def read_batch_urls(batch_fd): return False # "#" cannot be stripped out since it is part of the URI # However, it can be safely stripped out if following a whitespace - return re.split(r'\s#', url, 1)[0].rstrip() + return re.split(r'\s#', url, maxsplit=1)[0].rstrip() with contextlib.closing(batch_fd) as fd: return [url for url in map(fixup, fd) if url]