Skip to content

Latest commit

 

History

History
157 lines (90 loc) · 4.04 KB

File metadata and controls

157 lines (90 loc) · 4.04 KB

Yt Transcript Scraper

Atomic_agents Index / Atomic Agents / Lib / Tools / Yt Transcript Scraper

Auto-generated documentation for atomic_agents.lib.tools.yt_transcript_scraper module.

YouTubeTranscriptTool

Show source in yt_transcript_scraper.py:59

Tool for fetching the transcript of a YouTube video using the YouTube Transcript API.

Attributes

  • input_schema YouTubeTranscriptToolSchema - The schema for the input data.
  • output_schema YouTubeTranscriptToolOutputSchema - The schema for the output data.

Signature

class YouTubeTranscriptTool(BaseTool):
    def __init__(self, config: YouTubeTranscriptToolConfig): ...

See also

YouTubeTranscriptTool.extract_video_id

Show source in yt_transcript_scraper.py:115

Extracts the video ID from a YouTube URL.

Arguments

  • url str - The YouTube video URL.

Returns

  • str - The extracted video ID.

Signature

@staticmethod
def extract_video_id(url: str) -> str: ...

YouTubeTranscriptTool().fetch_video_metadata

Show source in yt_transcript_scraper.py:128

Fetches metadata for a YouTube video.

Arguments

  • video_id str - The YouTube video ID.

Returns

  • dict - The metadata of the video.

Signature

def fetch_video_metadata(self, video_id: str) -> dict: ...

YouTubeTranscriptTool().run

Show source in yt_transcript_scraper.py:81

Runs the YouTubeTranscriptTool with the given parameters.

Arguments

  • params YouTubeTranscriptToolSchema - The input parameters for the tool, adhering to the input schema.

Returns

Raises

  • Exception - If fetching the transcript fails.

Signature

def run(
    self, params: YouTubeTranscriptToolSchema
) -> YouTubeTranscriptToolOutputSchema: ...

See also

YouTubeTranscriptToolConfig

Show source in yt_transcript_scraper.py:52

Signature

class YouTubeTranscriptToolConfig(BaseToolConfig): ...

See also

YouTubeTranscriptToolOutputSchema

Show source in yt_transcript_scraper.py:35

Signature

class YouTubeTranscriptToolOutputSchema(BaseAgentIO): ...

See also

YouTubeTranscriptToolSchema

Show source in yt_transcript_scraper.py:17

Signature

class YouTubeTranscriptToolSchema(BaseAgentIO): ...

See also