diff --git a/youtube_dl/extractor/tvp.py b/youtube_dl/extractor/tvp.py index 1491e1ec9..e861ddbef 100644 --- a/youtube_dl/extractor/tvp.py +++ b/youtube_dl/extractor/tvp.py @@ -116,7 +116,12 @@ if not hasattr(InfoExtractor, '_match_valid_url'): # return self._parse_json(json_string, video_id, ignore_extra=True, **kwargs) return self._parse_json(json_string, video_id, **kwargs) except ExtractorError as e: - msg = 'Unable to extract {0} - Failed to parse JSON'.format(name) + except ExtractorError as e: + if not self._downloader.params.get('no_color') and compat_os_name != 'nt' and sys.stderr.isatty(): + _name = '\033[0;34m%s\033[0m' % name + else: + _name = name + msg = 'Unable to extract {0} - Failed to parse JSON'.format(_name) if fatal: raise ExtractorError(msg, cause=e.cause, video_id=video_id) elif not has_default: