Skip to content

Commit

Permalink
missed some modifications when updating youtube extractor
Browse files Browse the repository at this point in the history
  • Loading branch information
user234683 committed Nov 9, 2018
1 parent 630b476 commit 9dd8308
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions youtube_dl/extractor/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,7 @@ def extract_unavailable_message():
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:
Expand Down Expand Up @@ -1976,11 +1976,13 @@ def _extract_filesize(media_url):
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
Expand Down

0 comments on commit 9dd8308

Please sign in to comment.