use yt-dlp by default (#1850, #2028)

This commit is contained in:
Mike Fährmann
2021-11-29 04:36:43 +01:00
parent f1b142e993
commit f4e3cee6ac
8 changed files with 29 additions and 13 deletions

View File

@@ -14,6 +14,15 @@ import itertools
from . import text, util, exception
def import_module(module_name):
if module_name is None:
try:
return __import__("yt_dlp")
except ImportError:
return __import__("youtube_dl")
return __import__(module_name.replace("-", "_"))
def construct_YoutubeDL(module, obj, user_opts, system_opts=None):
opts = argv = None
config = obj.config