dmfelder commited on
Commit
b367dd8
·
verified ·
1 Parent(s): 34bd4c2

Update tools/youtube_transcript.py

Browse files
Files changed (1) hide show
  1. tools/youtube_transcript.py +2 -7
tools/youtube_transcript.py CHANGED
@@ -8,9 +8,8 @@ def youtube_transcript(video_id: str) -> str:
8
  Fetches the transcript of a YouTube video using its video ID.
9
 
10
  Args:
11
- video_id (str): The unique identifier of a YouTube video.
12
- For example, for https://www.youtube.com/watch?v=12345,
13
- the video_id is '12345'.
14
 
15
  Returns:
16
  str: The transcript of the specified YouTube video as bullet points.
@@ -21,7 +20,3 @@ def youtube_transcript(video_id: str) -> str:
21
  bullet_points = '\n'.join(f"- {entry['text']}" for entry in transcript)
22
 
23
  return bullet_points
24
-
25
- if __name__ == "__main__":
26
- transcript = youtube_transcript.invoke("1htKBjuUWec")
27
- print(transcript)
 
8
  Fetches the transcript of a YouTube video using its video ID.
9
 
10
  Args:
11
+ video_id (str): The unique identifier of a YouTube video.
12
+ Example: For https://www.youtube.com/watch?v=12345, the video_id is '12345'.
 
13
 
14
  Returns:
15
  str: The transcript of the specified YouTube video as bullet points.
 
20
  bullet_points = '\n'.join(f"- {entry['text']}" for entry in transcript)
21
 
22
  return bullet_points