INNER CODE UNIT · Python
YouTubeDataUnparsable
jdepoix/youtube-transcript-api · youtube_transcript_api/_errors.py:76
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)
@property
def cause(self) -> str:
return self.CAUSE_MESSAGE.format(
reason=self.reason,