Function convertYoutubeToText

  • Fetch youtube.com video's webpage HTML for embedded transcript if blocked, use scraper of alternative sites

    Parameters

    • videoUrl: string
    • Optionaloptions: {
          addTimestamps: boolean;
          timeout: boolean;
      } = {}
      • addTimestamps: boolean

        default=true - true to return timestamps, default true

      • timeout: boolean

        default=5 - http request timeout

    Returns any

    {content, timestamps} where content is the full text of the transcript, and timestamps is an array of [characterIndex, timeSeconds]