Spaces:
Paused
Paused
Update app.py
Browse files523 unmodified lines524525526527527528529530531523 unmodified lines): """Get the transcript of a YouTube video.""" try: transcript = YTTranscriber.get_transcript(video_url, preserve_formatting=preserve_formatting, proxies=proxy) proxies = {"http": proxy, "https": proxy} if proxy else None transcript = 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