INNER CODE UNIT · Python

cause

jdepoix/youtube-transcript-api · youtube_transcript_api/_errors.py:69

    def cause(self) -> str:
        return self.CAUSE_MESSAGE

    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):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…