[ytdl] improve module imports (#1680)

Apply 'extractor.ytdl.module' for every URL, not just the first.
This commit is contained in:
Mike Fährmann
2021-07-13 16:59:55 +02:00
parent e95f99882f
commit e622e004f0
2 changed files with 13 additions and 23 deletions

View File

@@ -15,13 +15,9 @@ import os
class YoutubeDLDownloader(DownloaderBase):
scheme = "ytdl"
module = None
def __init__(self, job):
module = self.module
if not module:
module_name = self.config("module") or "youtube_dl"
module = YoutubeDLDownloader.module = __import__(module_name)
module = __import__(self.config("module") or "youtube_dl")
DownloaderBase.__init__(self, job)
extractor = job.extractor