moFouad1 commited on
Commit
6fb0bd9
·
verified ·
1 Parent(s): d98ef73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -68,9 +68,11 @@ def download_audio_youtube(url, output_path="audio.wav", cookies_path=None):
68
  formats = f"\u26a0\ufe0f Could not list formats due to: {format_err}"
69
 
70
  raise RuntimeError(
71
- f"yt-dlp failed: {e}\n\n"
72
- f"Available formats for this video:\n\n{formats}"
73
- )
 
 
74
 
75
  return extract_audio_from_video(fallback_video_path, audio_path=output_path)
76
 
 
68
  formats = f"\u26a0\ufe0f Could not list formats due to: {format_err}"
69
 
70
  raise RuntimeError(
71
+ "\u26a0\ufe0f Could not download this YouTube video due to restrictions. "
72
+ "Please use this alternative tool to extract the transcript manually:\n\n"
73
+ f"https://youtubetotranscript.com/transcript?v={video_id}&current_language_code=en"
74
+ )
75
+
76
 
77
  return extract_audio_from_video(fallback_video_path, audio_path=output_path)
78