Python Prompts Free Prompt

Python Script to Scrape YouTube Comments

Write a Python script that scrapes comments from a YouTube video using YouTube Data API or Selenium
☆ Save
Prompt
You are a Python developer. Write a script that extracts comments from a YouTube video. Use YouTube Data API if possible, or Selenium for scraping. The script must: 1) Accept video URL, 2) Extract commenter name, comment, likes, date, 3) Handle pagination, 4) Save to CSV, 5) Handle API rate limits, 6) Log progress, 7) Include error handling. Add comments.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.