Scrapegraph-ai/examples/graph_example.py
2024-02-13 22:00:22 +01:00

18 lines
364 B
Python

from yosoai.graph import SmartScraper
OPENAI_API_KEY = ''
llm_config = {
"api_key": OPENAI_API_KEY,
"model_name": "gpt-3.5-turbo",
}
url = "https://perinim.github.io/projects/"
prompt = "List me all the titles and project descriptions"
smart_scraper = SmartScraper(prompt, url, llm_config)
answer = smart_scraper.run()
print(answer)