Spaces:
Sleeping
Sleeping
Fix tool
Browse files- community_tools.py +2 -1
community_tools.py
CHANGED
@@ -23,7 +23,8 @@ def get_youtube_transcript_from_url(video_url: str = None)->str:
|
|
23 |
Returns:
|
24 |
The transcript of the YouTube video as a string
|
25 |
"""
|
26 |
-
|
|
|
27 |
docs = youtube_loader.load()
|
28 |
transcript = docs[0].page_content
|
29 |
return transcript
|
|
|
23 |
Returns:
|
24 |
The transcript of the YouTube video as a string
|
25 |
"""
|
26 |
+
video_id = video_url.split("=")[1]
|
27 |
+
youtube_loader = YoutubeLoader(video_id=video_id)
|
28 |
docs = youtube_loader.load()
|
29 |
transcript = docs[0].page_content
|
30 |
return transcript
|