Back to Prompts
Coding Assistant

Create a Basic Web Scraper

Start here - simplest scraping pattern From the Web Scraping AI Coding Building Block.

Prompt
Create a simple web scraper that collects data from a website.

Language: [Python, JavaScript, etc.]
Library: [BeautifulSoup, Cheerio, Puppeteer, or suggest one]

I want to scrape: [describe the website and what data you need, e.g., "product prices from an e-commerce category page"]

Requirements:
1. Load the webpage
2. Find the elements containing [product name, price, rating, etc.]
3. Extract the text/values from those elements
4. Save the results to a simple format (list, CSV, or JSON)

Keep it simple — I want to understand the basic pattern first. Show me:
- How to fetch the page
- How to find elements using CSS selectors
- How to extract the text I want
- How to handle multiple items on one page

I'm learning, so explain each step simply. What is a CSS selector and how do I find one?
1 views 0 copies