]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/downloader/niconico.py
[utils] `traverse_obj`: Fix more bugs
[yt-dlp.git] / yt_dlp / downloader / niconico.py
index 0e6c177b731c12957890763809ebce6b1df144e0..77ed39e5b9c0992f6fa9045c3b1644358f2299b7 100644 (file)
@@ -1,19 +1,17 @@
 import threading
 
+from . import get_suitable_downloader
 from .common import FileDownloader
-from ..downloader import get_suitable_downloader
-from ..extractor.niconico import NiconicoIE
 from ..utils import sanitized_Request
 
 
 class NiconicoDmcFD(FileDownloader):
     """ Downloading niconico douga from DMC with heartbeat """
 
-    FD_NAME = 'niconico_dmc'
-
     def real_download(self, filename, info_dict):
-        self.to_screen('[%s] Downloading from DMC' % self.FD_NAME)
+        from ..extractor.niconico import NiconicoIE
 
+        self.to_screen('[%s] Downloading from DMC' % self.FD_NAME)
         ie = NiconicoIE(self.ydl)
         info_dict, heartbeat_info_dict = ie._get_heartbeat_info(info_dict)
 
@@ -51,4 +49,4 @@ def heartbeat():
                 with heartbeat_lock:
                     timer[0].cancel()
                     download_complete = True
-            return success
+        return success