Spaces:
Sleeping
Sleeping
if transcript:
Browse filesprint("成功獲取字幕")
else:
print("沒有找到字幕")
app.py
CHANGED
@@ -437,6 +437,10 @@ def process_transcript_and_screenshots_on_gcs(video_id):
|
|
437 |
if not is_transcript_exists:
|
438 |
# 从YouTube获取逐字稿并上传
|
439 |
transcript = get_transcript(video_id)
|
|
|
|
|
|
|
|
|
440 |
transcript_text = json.dumps(transcript, ensure_ascii=False, indent=2)
|
441 |
else:
|
442 |
# 逐字稿已存在,下载逐字稿内容
|
|
|
437 |
if not is_transcript_exists:
|
438 |
# 从YouTube获取逐字稿并上传
|
439 |
transcript = get_transcript(video_id)
|
440 |
+
if transcript:
|
441 |
+
print("成功獲取字幕")
|
442 |
+
else:
|
443 |
+
print("沒有找到字幕")
|
444 |
transcript_text = json.dumps(transcript, ensure_ascii=False, indent=2)
|
445 |
else:
|
446 |
# 逐字稿已存在,下载逐字稿内容
|