浏览代码

[testurl] Fix case when only one IE matches

Philipp Hagemeister 11 年之前
父节点
当前提交
4d756a9cc0
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      youtube_dl/extractor/testurl.py

+ 2 - 0
youtube_dl/extractor/testurl.py

@@ -39,6 +39,8 @@ class TestURLIE(InfoExtractor):
                     ('Found multiple matching extractors: %s' %
                     ('Found multiple matching extractors: %s' %
                         ' '.join(ie.IE_NAME for ie in matching_extractors)),
                         ' '.join(ie.IE_NAME for ie in matching_extractors)),
                     expected=True)
                     expected=True)
+        else:
+            extractor = matching_extractors[0]
 
 
         num_str = mobj.group('num')
         num_str = mobj.group('num')
         num = int(num_str) if num_str else 0
         num = int(num_str) if num_str else 0