mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-22 21:28:12 +02:00
Fix YouTube transcript API: replace deprecated get_transcript with fetch method
This commit is contained in:
parent
8bbc8dba4e
commit
c08508c0c4
1 changed files with 2 additions and 1 deletions
|
|
@ -136,7 +136,8 @@ async def add_youtube_video_document(
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
captions = YouTubeTranscriptApi.get_transcript(video_id)
|
ytt_api = YouTubeTranscriptApi()
|
||||||
|
captions = ytt_api.fetch(video_id)
|
||||||
# Include complete caption information with timestamps
|
# Include complete caption information with timestamps
|
||||||
transcript_segments = []
|
transcript_segments = []
|
||||||
for line in captions:
|
for line in captions:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue