youtubetranscript

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package youtubetranscript provides a tool to fetch transcript/captions from YouTube videos. It mimics how other systems (e.g. LangChain YoutubeLoader, youtube-transcript-api) do it: fetch the watch page, extract the caption track URL from the player response, then fetch the caption content. No YouTube API key or external transcript service is required.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTool

func NewTool() tool.CallableTool

NewTool returns a callable tool that fetches YouTube video transcripts. Use this when the user asks to transcribe, scribe, or get captions from a YouTube video.

Types

type Request

type Request struct {
	VideoURL  string `` /* 145-byte string literal not displayed */
	Language  string `` /* 162-byte string literal not displayed */
	WithTimes bool   `` /* 138-byte string literal not displayed */
}

Request is the input for the youtube_transcript tool.

type ToolProvider

type ToolProvider struct{}

ToolProvider satisfies the tools.ToolProviders interface for the YouTube transcript tool.

func NewToolProvider

func NewToolProvider() *ToolProvider

NewToolProvider creates a ToolProvider for the youtube_transcript tool.

func (*ToolProvider) GetTools

func (p *ToolProvider) GetTools() []tool.Tool

GetTools returns the YouTube transcript tool.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL