mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-06-20 21:13:05 +08:00
|
|
||
|---|---|---|
| .. | ||
| ollama | ||
| openai | ||
| .env.example | ||
| README.md | ||
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
- Install required dependencies
- Copy
.env.exampleto.env - Configure your OpenAI API key in the
.envfile
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