From a1e66a015843b713333a5565791ea8f26aad4b5b Mon Sep 17 00:00:00 2001 From: Jonas Depoix Date: Thu, 20 Jun 2019 16:43:53 +0200 Subject: [PATCH] updated error message --- youtube_transcript_api/_api.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/youtube_transcript_api/_api.py b/youtube_transcript_api/_api.py index 46a2154..ca0dcfb 100644 --- a/youtube_transcript_api/_api.py +++ b/youtube_transcript_api/_api.py @@ -27,8 +27,13 @@ class YouTubeTranscriptApi(): ERROR_MESSAGE = ( 'Could not get the transcript for the video {video_url}! ' - 'Most likely subtitles have been disabled by the uploader or the video is no longer ' - 'available.' + 'This usually happens if one of the following things is the case:\n' + ' - subtitles have been disabled by the uploader\n' + ' - none of the language codes you provided are valid\n' + ' - none of the languages you provided are supported by the video\n' + ' - the video is no longer available.\n\n' + 'If none of these things is the case, please create an issue at ' + 'https://github.com/jdepoix/youtube-transcript-api/issues' ) def __init__(self, video_id):