youngtsai commited on
Commit
aae1ef7
1 Parent(s): 66d6a91
Files changed (1) hide show
  1. app.py +1 -1
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=['en'])
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)