INNER CODE UNIT · Python

_build_error_message

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

    def _build_error_message(self) -> str:
        error_message = self.ERROR_MESSAGE.format(
            video_url=WATCH_URL.format(video_id=self.video_id)
        )

        cause = self.cause
        if cause:
            error_message += (
                self.CAUSE_MESSAGE_INTRO.format(cause=cause) + self.GITHUB_REFERRAL
            )

        return error_message

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

    def __str__(self) -> str:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…