[job] improve URL 'scheme' extraction performance
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user