]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/utils/_utils.py
[misc] Cleanup (#9765)
[yt-dlp.git] / yt_dlp / utils / _utils.py
index 5f458ea454744fa2df1e5105fb3df43273d08be3..42803bb6dfecbd76dca6c8149453e38411c97cee 100644 (file)
@@ -2525,7 +2525,7 @@ def fixup(url):
             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]