mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-12 21:01:56 +08:00
22 lines
469 B
Python
22 lines
469 B
Python
|
|
from scrapegraphai.graphs import DepthSearchGraph
|
|
|
|
graph_config = {
|
|
"llm": {
|
|
"api_key":"YOUR_API_KEY",
|
|
"model": "openai/gpt-4o-mini",
|
|
},
|
|
"verbose": True,
|
|
"headless": False,
|
|
"depth": 2,
|
|
"only_inside_links": True,
|
|
}
|
|
|
|
search_graph = DepthSearchGraph(
|
|
prompt="List me all the projects with their description",
|
|
source="https://perinim.github.io/projects/",
|
|
config=graph_config
|
|
)
|
|
|
|
result = search_graph.run()
|
|
print(result) |