Python Prompts Free Prompt

Python Script to Scrape Google Search Results

Write a Python script to scrape Google search results using requests and BeautifulSoup
☆ Save
Prompt
You are a Python developer. Write a script that performs a Google search for a given query and extracts the top results (title, URL, description). Use requests and BeautifulSoup. The script must: 1) Accept query as argument, 2) Handle pagination (next pages), 3) Respect robots.txt and use polite delays, 4) Rotate user agents, 5) Save results to CSV, 6) Handle CAPTCHAs (detect and alert), 7) Provide option to use proxies. Add comments and a README.

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.