Skip to content

Commit 7c33d56

Browse files
committed
tested multi tool call
1 parent c90a507 commit 7c33d56

5 files changed

Lines changed: 2136 additions & 0 deletions

File tree

explore_scrpngai/pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[project]
2+
name = "explore-scrpngai"
3+
version = "0.1.0"
4+
requires-python = ">=3.11"
5+
dependencies = [
6+
"scrapegraphai>=1.50.0",
7+
]

explore_scrpngai/scrape_00.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from scrapegraphai.graphs import SmartScraperGraph
2+
import os
3+
import json
4+
5+
# Define the configuration for the scraping pipeline
6+
graph_config = {
7+
"llm": {
8+
"api_key": os.environ["OPENAI_API_KEY"],
9+
"model": "openai/gpt-4o-mini",
10+
},
11+
"verbose": True,
12+
"headless": False,
13+
}
14+
15+
# Create the SmartScraperGraph instance
16+
smart_scraper_graph = SmartScraperGraph(
17+
prompt="Extract useful information from the webpage, including a description of what the company does, founders and social media links",
18+
source="https://scrapegraphai.com/",
19+
config=graph_config,
20+
)
21+
22+
# Run the pipeline
23+
result = smart_scraper_graph.run()
24+
25+
26+
print(json.dumps(result, indent=4))

0 commit comments

Comments
 (0)