This Jupyter notebook allows you to analyze and chat with the content of any YouTube video using AI. It extracts the transcript from a YouTube video and uses OpenAI to generate responses to questions about the video content.
Before using this notebook, you'll need to install the following dependencies:
pip install openai playwright python-dotenv jupyter hyperbrowserYou'll also need to install Playwright's browser dependencies:
python -m playwright install chromiumCreate a .env file in the same directory as the notebook with the following environment variables:
OPENAI_API_KEY=your_openai_api_key
HYPERBROWSER_API_KEY=your_hyperbrowser_api_key
You can get a Hyperbrowser API key from hyperbrowser.ai.
- Run the notebook cells in sequence
- Enter your YouTube URL in the designated cell
- The notebook will extract the video transcript
- You can then ask questions about the video content in the question cells
- Add new cells as needed for additional questions
- Extracts YouTube video transcripts with timestamps
- Uses OpenAI to answer questions about video content
- Maintains conversation context through chat history
- Displays the full transcript for reference
- Minimizes interactivity with user parameters at the start