diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 018d585ee..956b869f0 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -91,6 +91,7 @@ from .utils import ( write_string, YoutubeDLCookieJar, YoutubeDLCookieProcessor, + YoutubeDLError, YoutubeDLHandler, YoutubeDLRedirectHandler, ) @@ -1862,7 +1863,6 @@ class YoutubeDL(object): # subtitles download errors are already managed as troubles in relevant IE # that way it will silently go on when used with unsupporting IE subtitles = info_dict['requested_subtitles'] - ie = self.get_info_extractor(info_dict['extractor_key']) for sub_lang, sub_info in subtitles.items(): sub_format = sub_info['ext'] sub_filename = subtitles_filename(filename, sub_lang, sub_format, info_dict.get('ext')) @@ -1887,7 +1887,7 @@ class YoutubeDL(object): # The FD is supposed to encodeFilename() if not fd.download(sub_filename, sub_info): # depending on the FD, it may catch errors and return False, or not - raise DownloadError('Subtitle download failed') + raise YoutubeDLError('Subtitle download failed') except (compat_urllib_error.URLError, compat_http_client.HTTPException, socket.error, OSError, IOError, YoutubeDLError) as err: self.report_warning('Unable to download subtitle for "%s": %s' % (sub_lang, error_to_compat_str(err))) diff --git a/youtube_dl/downloader/__init__.py b/youtube_dl/downloader/__init__.py index f3200566e..2e485df9d 100644 --- a/youtube_dl/downloader/__init__.py +++ b/youtube_dl/downloader/__init__.py @@ -33,8 +33,7 @@ def get_suitable_downloader(info_dict, params={}): """Get the downloader class that can handle the info dict.""" protocol = determine_protocol(info_dict) info_dict['protocol'] = protocol - print('SACHA> ', protocol) - + # if (info_dict.get('start_time') or info_dict.get('end_time')) and not info_dict.get('requested_formats') and FFmpegFD.can_download(info_dict): # return FFmpegFD diff --git a/youtube_dl/extractor/francetv.py b/youtube_dl/extractor/francetv.py index 95ef0bf6c..003a3a0dc 100644 --- a/youtube_dl/extractor/francetv.py +++ b/youtube_dl/extractor/francetv.py @@ -17,7 +17,6 @@ from ..utils import ( url_or_none, ) from .dailymotion import DailymotionIE -from ..downloader import PROTOCOL_MAP class FranceTVBaseInfoExtractor(InfoExtractor):