mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-15 18:12:58 +00:00
Create a function in InfoExtractors that returns the InfoExtractor class with the given name
This commit is contained in:
parent
f7a9721e16
commit
9341212642
@ -67,7 +67,7 @@ def setUp(self):
|
|||||||
def generator(test_case):
|
def generator(test_case):
|
||||||
|
|
||||||
def test_template(self):
|
def test_template(self):
|
||||||
ie = getattr(youtube_dl.InfoExtractors, test_case['name'] + 'IE')
|
ie = youtube_dl.InfoExtractors.get_info_extractor(test_case['name'])#getattr(youtube_dl.InfoExtractors, test_case['name'] + 'IE')
|
||||||
if not ie._WORKING:
|
if not ie._WORKING:
|
||||||
print('Skipping: IE marked as not _WORKING')
|
print('Skipping: IE marked as not _WORKING')
|
||||||
return
|
return
|
||||||
|
@ -4469,3 +4469,7 @@ def gen_extractors():
|
|||||||
ARDIE(),
|
ARDIE(),
|
||||||
GenericIE()
|
GenericIE()
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def get_info_extractor(ie_name):
|
||||||
|
"""Returns the info extractor class with the given ie_name"""
|
||||||
|
return globals()[ie_name+'IE']
|
||||||
|
Loading…
Reference in New Issue
Block a user