Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 653 Bytes

File metadata and controls

30 lines (20 loc) · 653 Bytes

Smart Scraper Example

This example demonstrates how to use Scrapegraph-ai for intelligent web scraping with automatic content detection and extraction.

Features

  • Intelligent content detection
  • Automatic data extraction
  • Content classification
  • Clean data output

Setup

  1. Install required dependencies
  2. Copy .env.example to .env
  3. Configure your OpenAI API key in the .env file

Usage

from scrapegraphai.graphs import SmartScraperGraph

graph = SmartScraperGraph()
results = graph.scrape("https://example.com")

Environment Variables

Required environment variables:

  • OPENAI_API_KEY: Your OpenAI API key