aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2018-11-09 01:39:14 -0800
committerJames Taylor <user234683@users.noreply.github.com>2018-11-09 01:39:14 -0800
commit9dd8308cf23de69c741f0304ace102718b844e16 (patch)
treeaf1aca18e17f60b9572faf6b8fe09326c64cc788 /youtube_dl/extractor/youtube.py
parent630b476e42af47f7a0c8930e00c0e6c9cdc384d2 (diff)
downloadyt-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/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py10
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