def get_captions(url: str, languages: List[str] = None) -> str:
        """
        Get captions/transcript from a YouTube video.
        
        Args:
            url: The URL of the YouTube video
            languages: List of language codes to try (default: ["en"])
            
        Returns:
            The video transcript as text
        """
        from youtube_transcript_api import YouTubeTranscriptApi
        
        # Default to English if no languages specified
        if not languages:
            languages = ["en"]
            
        video_id = YouTubeVideo.get_video_id(url)
        if not video_id:
            return "Error: Could not extract video ID from URL"
            
        try:
            transcript = YouTubeTranscriptApi.get_transcript(video_id, languages=languages)
            return " ".join(line["text"] for line in transcript)
        except Exception as e:
            return f"Error getting captions: {str(e)}"

        Get captions/transcript from a YouTube video.
        
        Args:
            url: The URL of the YouTube video
            languages: List of language codes to try (default: ["en"])
            
        Returns:
            The video transcript as text
        
src/upsonic/tools.py