INNER CODE UNIT · Python
__str__
jdepoix/youtube-transcript-api · youtube_transcript_api/_errors.py:72
def __str__(self) -> str:
return self._build_error_message()
class YouTubeDataUnparsable(CouldNotRetrieveTranscript):
CAUSE_MESSAGE = (
"The data required to fetch the transcript is not parsable. This should "
"not happen, please open an issue (make sure to include the video ID)!"
)
class YouTubeRequestFailed(CouldNotRetrieveTranscript):
CAUSE_MESSAGE = "Request to YouTube failed: {reason}"
def __init__(self, video_id: str, http_error: HTTPError):
self.reason = str(http_error)
super().__init__(video_id)