An AI-powered tool that analyzes YouTube videos by examining their transcripts and comments to provide either detailed reports or concise summaries.
- 📝 Video transcript extraction (using official captions or Whisper for audio transcription)
- 💬 Comment analysis and filtering
- 📊 Two analysis types:
- Detailed Report: Comprehensive analysis of video content and reception
- Concise Summary: Key points and main takeaways
- 🤖 AI-powered analysis using CrewAI
- 🔍 Spam comment detection and filtering
Before you begin, ensure you have the following installed:
- Python 3.9 or higher
- FFmpeg (required for Whisper audio transcription)
- Git
sudo apt update
sudo apt install ffmpeg- Download FFmpeg from the official website: https://ffmpeg.org/download.html
- Extract the downloaded archive
- Add the FFmpeg
binfolder to your system's PATH environment variable
- Clone the repository:
git clone https://github.com/yourusername/youtube_agent.git
cd youtube_agent- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activatepython -m venv venv
venv\Scripts\activate- Install the required packages:
pip install -r requirements.txt- Set up environment variables:
cp .env.example .envEdit the .env file and add your API keys:
YOUTUBE_API_KEY: Get from Google Cloud ConsoleOPENAI_API_KEY: Get from OpenAI dashboard
- Activate the virtual environment (if not already activated):
source venv/bin/activatevenv\Scripts\activate- Run the analysis tool:
python main.py-
Follow the prompts:
- Enter a YouTube video URL
- Choose analysis type (1 for Detailed Report, 2 for Concise Summary)
-
The tool will:
- Extract the video transcript
- Collect and analyze comments
- Generate an AI analysis based on your chosen type
- Save the analysis to the
docsdirectory
Analysis results are saved in the docs directory:
- Reports:
docs/report/YYYYMMDD_HHMMSS.md - Summaries:
docs/summary/YYYYMMDD_HHMMSS.md
Contributions are welcome! Please feel free to submit a Pull Request.