From 1d99efffa0fdee56dd9656887c747d15594a3611 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Thu, 9 Aug 2018 00:16:33 -0700 Subject: Use the more descriptive error when vid not available --- youtube_dl/extractor/youtube.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'youtube_dl/extractor') diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 39e4ca5..5531f74 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1935,9 +1935,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor): a_format.setdefault('http_headers', {})['Youtubedl-no-compression'] = 'True' formats.append(a_format) else: - error_message = clean_html(video_info.get('reason', [None])[0]) + error_message = extract_unavailable_message() if not error_message: - error_message = extract_unavailable_message() + error_message = clean_html(video_info.get('reason', [None])[0]) if error_message: raise YoutubeError(error_message) raise ExtractorError('no conn, hlsvp or url_encoded_fmt_stream_map information found in video info') -- cgit v1.2.3