[job] improve URL 'scheme' extraction performance

This commit is contained in:
Mike Fährmann
2025-07-29 22:26:21 +02:00
parent a0b96bf0d6
commit 64de6605ce

View File

@@ -513,8 +513,7 @@ class DownloadJob(Job):
def download(self, url):
"""Download 'url'"""
scheme = url.partition(":")[0]
if downloader := self.get_downloader(scheme):
if downloader := self.get_downloader(url[:url.find(":")]):
try:
return downloader.download(url, self.pathfmt)
except OSError as exc: