Atomic_agents Index / Atomic Agents / Lib / Tools / Yt Transcript Scraper
Auto-generated documentation for atomic_agents.lib.tools.yt_transcript_scraper module.
Show source in yt_transcript_scraper.py:59
Tool for fetching the transcript of a YouTube video using the YouTube Transcript API.
input_schemaYouTubeTranscriptToolSchema - The schema for the input data.output_schemaYouTubeTranscriptToolOutputSchema - The schema for the output data.
class YouTubeTranscriptTool(BaseTool):
def __init__(self, config: YouTubeTranscriptToolConfig): ...Show source in yt_transcript_scraper.py:115
Extracts the video ID from a YouTube URL.
urlstr - The YouTube video URL.
str- The extracted video ID.
@staticmethod
def extract_video_id(url: str) -> str: ...Show source in yt_transcript_scraper.py:128
Fetches metadata for a YouTube video.
video_idstr - The YouTube video ID.
dict- The metadata of the video.
def fetch_video_metadata(self, video_id: str) -> dict: ...Show source in yt_transcript_scraper.py:81
Runs the YouTubeTranscriptTool with the given parameters.
paramsYouTubeTranscriptToolSchema - The input parameters for the tool, adhering to the input schema.
- YouTubeTranscriptToolOutputSchema - The output of the tool, adhering to the output schema.
Exception- If fetching the transcript fails.
def run(
self, params: YouTubeTranscriptToolSchema
) -> YouTubeTranscriptToolOutputSchema: ...Show source in yt_transcript_scraper.py:52
class YouTubeTranscriptToolConfig(BaseToolConfig): ...Show source in yt_transcript_scraper.py:35
class YouTubeTranscriptToolOutputSchema(BaseAgentIO): ...Show source in yt_transcript_scraper.py:17
class YouTubeTranscriptToolSchema(BaseAgentIO): ...