Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -492,7 +492,9 @@ def get_youtube_transcript(video_url: str) -> str:
|
|
| 492 |
return f"Error: Could not extract video ID."
|
| 493 |
|
| 494 |
from youtube_transcript_api import YouTubeTranscriptApi
|
| 495 |
-
|
|
|
|
|
|
|
| 496 |
|
| 497 |
if not transcript_list:
|
| 498 |
return "Error: No transcript found."
|
|
|
|
| 492 |
return f"Error: Could not extract video ID."
|
| 493 |
|
| 494 |
from youtube_transcript_api import YouTubeTranscriptApi
|
| 495 |
+
|
| 496 |
+
# FIXED: Use get_transcript instead of list_transcripts
|
| 497 |
+
transcript_list = YouTubeTranscriptApi.get_transcript(video_id, languages=['en'])
|
| 498 |
|
| 499 |
if not transcript_list:
|
| 500 |
return "Error: No transcript found."
|