]> git.bitcoin.ninja Git - youtube-dl/commitdiff
lazy extractors: Output if it's enabled in the verbose log
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 21 Feb 2016 11:28:58 +0000 (12:28 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Fri, 8 Apr 2016 19:50:54 +0000 (21:50 +0200)
youtube_dl/YoutubeDL.py
youtube_dl/extractor/__init__.py

index f18a8e840553528703e79cf3dd2415173a568d0e..a89a71a250e3c02cb1157bfc0970e308474e4e89 100755 (executable)
@@ -82,7 +82,7 @@ from .utils import (
     YoutubeDLHandler,
 )
 from .cache import Cache
-from .extractor import get_info_extractor, gen_extractor_classes
+from .extractor import get_info_extractor, gen_extractor_classes, _LAZY_LOADER
 from .downloader import get_suitable_downloader
 from .downloader.rtmp import rtmpdump_version
 from .postprocessor import (
@@ -1959,6 +1959,8 @@ class YoutubeDL(object):
         write_string(encoding_str, encoding=None)
 
         self._write_string('[debug] youtube-dl version ' + __version__ + '\n')
+        if _LAZY_LOADER:
+            self._write_string('[debug] Lazy loading extractors enabled' + '\n')
         try:
             sp = subprocess.Popen(
                 ['git', 'rev-parse', '--short', 'HEAD'],
index b0d4d156b411e29cec6803b181bfacc0a87262b7..18d8dbcd6672f82776a9bd9f6f4cc63cac91129d 100644 (file)
@@ -3,7 +3,9 @@ from __future__ import unicode_literals
 try:
     from .lazy_extractors import *
     from .lazy_extractors import _ALL_CLASSES
+    _LAZY_LOADER = True
 except ImportError:
+    _LAZY_LOADER = False
     from .extractors import *
 
     _ALL_CLASSES = [