11import sys , os , copy , logging
22from urllib .parse import urlparse
3- import youtube_dl
3+ import youtube_dlc
44from colorboy import cyan , green , red
55from deep_filter import deep_filter
66from shlex import quote
@@ -68,12 +68,12 @@ def download(options):
6868 'outtmpl' : ytdl_output_template ,
6969 'quiet' : False if options ['verbose' ] else True ,
7070 }
71- with youtube_dl .YoutubeDL (ytdl_get_info_options ) as ytdl :
71+ with youtube_dlc .YoutubeDL (ytdl_get_info_options ) as ytdl :
7272 try :
7373 info_result = ytdl .extract_info (options ['url' ], download = False )
7474 except Exception as err :
7575 if options ['verbose' ]: logging .exception (err )
76- log .fatal ('youtube-dl failed to get URL info' )
76+ log .fatal ('youtube-dlc failed to get URL info' )
7777 if options ['verbose' ]: log .pretty (info_result )
7878
7979 # delete None properties/indexes
@@ -127,8 +127,8 @@ def callback(value):
127127 filename_split [len (filename_split )- 1 ] = options ['file_format' ]
128128 filename = '.' .join (filename_split )
129129 if options ['verbose' ]:
130- # print youtube-dl command:
131- command = green ('youtube-dl command: ' )+ 'youtube-dl '
130+ # print youtube-dlc command:
131+ command = green ('youtube-dlc command: ' )+ 'youtube-dlc '
132132 for arg in ytdl_args + [video ['webpage_url' ]]:
133133 command += quote (arg )+ ' '
134134 log (command )
@@ -138,7 +138,7 @@ def callback(value):
138138
139139 # download
140140 try :
141- youtube_dl .main (ytdl_args + [video ['webpage_url' ]])
141+ youtube_dlc .main (ytdl_args + [video ['webpage_url' ]])
142142 except (Exception , SystemExit ) as err :
143143 if type (err ) == SystemExit and err .code == 0 :
144144 # don't treat sys.exit(0) as error
0 commit comments