diff options
author | James Taylor <user234683@users.noreply.github.com> | 2018-11-09 01:39:14 -0800 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2018-11-09 01:39:14 -0800 |
commit | 9dd8308cf23de69c741f0304ace102718b844e16 (patch) | |
tree | af1aca18e17f60b9572faf6b8fe09326c64cc788 /youtube_dl | |
parent | 630b476e42af47f7a0c8930e00c0e6c9cdc384d2 (diff) | |
download | yt-local-9dd8308cf23de69c741f0304ace102718b844e16.tar.lz yt-local-9dd8308cf23de69c741f0304ace102718b844e16.tar.xz yt-local-9dd8308cf23de69c741f0304ace102718b844e16.zip |
missed some modifications when updating youtube extractor
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 3822e18..cddc2a4 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1724,7 +1724,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): unavailable_message = extract_unavailable_message() if unavailable_message: reason = unavailable_message - raise ExtractorError( + raise YoutubeError( 'YouTube said: %s' % reason, expected=True, video_id=video_id) else: @@ -1976,11 +1976,13 @@ 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() + alt_error_message = clean_html(video_info.get('reason', [None])[0]) + print(alt_error_message) if not error_message: - error_message = extract_unavailable_message() + error_message = alt_error_message if error_message: - raise ExtractorError(error_message, expected=True) + raise YoutubeError(error_message) raise ExtractorError('no conn, hlsvp or url_encoded_fmt_stream_map information found in video info') # uploader |