Spaces:
Sleeping
Sleeping
zh-TW
Browse files
app.py
CHANGED
@@ -166,7 +166,7 @@ def process_youtube_link(link):
|
|
166 |
exists, file_id = check_file_exists(service, folder_id, file_name)
|
167 |
if not exists:
|
168 |
# 获取逐字稿
|
169 |
-
transcript = YouTubeTranscriptApi.get_transcript(video_id, languages=['
|
170 |
transcript_text = "\n".join([f"{item['start']}: {item['text']}" for item in transcript])
|
171 |
# 上传到Google Drive
|
172 |
upload_to_drive(service, file_name, folder_id, transcript_text)
|
|
|
166 |
exists, file_id = check_file_exists(service, folder_id, file_name)
|
167 |
if not exists:
|
168 |
# 获取逐字稿
|
169 |
+
transcript = YouTubeTranscriptApi.get_transcript(video_id, languages=['zh-TW'])
|
170 |
transcript_text = "\n".join([f"{item['start']}: {item['text']}" for item in transcript])
|
171 |
# 上传到Google Drive
|
172 |
upload_to_drive(service, file_name, folder_id, transcript_text)
|