]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Create a function in InfoExtractors that returns the InfoExtractor class with the...
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 20 Apr 2013 10:42:57 +0000 (12:42 +0200)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sat, 20 Apr 2013 10:42:57 +0000 (12:42 +0200)
test/test_download.py
youtube_dl/InfoExtractors.py

index e3513efba19fc7ee00134226396ea451b6279cf9..cf8028718fc86f31da16a0910817e4f06e56f8e3 100644 (file)
@@ -67,7 +67,7 @@ class TestDownload(unittest.TestCase):
 def generator(test_case):
 
     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:
             print('Skipping: IE marked as not _WORKING')
             return
index 8bfb2809b69b6c5fa2877bc152ad64cd53abb1de..eeedcf792b74dafd275bffb27ca21f5e8f98f387 100755 (executable)
@@ -4469,3 +4469,7 @@ def gen_extractors():
         ARDIE(),
         GenericIE()
     ]
+
+def get_info_extractor(ie_name):
+    """Returns the info extractor class with the given ie_name"""
+    return globals()[ie_name+'IE']