Spaces:
Paused
Paused
Update app.py
Browse files523 unmodified lines524525526527528529530523 unmodified lines):"""Get the transcript of a YouTube video."""try:transcript = YTTranscriber.get_transcript(video_url, preserve_formatting=preserve_formatting, proxies=proxy)return JSONResponse(content=jsonable_encoder(transcript))except Exception as e:raise HTTPException(status_code=500, detail=f"Error getting YouTube transcript: {e}")523 unmodified lines524525526527528529530531523 unmodified lines):"""Get the transcript of a YouTube video."""try:proxies = {"http": proxy, "https": proxy} if proxy else Nonetranscript = YTTranscriber.get_transcript(video_url, languages=None, preserve_formatting=preserve_formatting, proxies=proxies)return JSONResponse(content=jsonable_encoder(transcript))except Exception as e:raise HTTPException(status_code=500, detail=f"Error getting YouTube transcript: {e}")
app.py+2-1