From 9eb40e1eae84412cfd1bbcc339874f660dab1258 Mon Sep 17 00:00:00 2001 From: Marco Vinciguerra Date: Thu, 12 Sep 2024 09:06:15 +0200 Subject: [PATCH] Update script_generator_openai.py --- examples/openai/script_generator_openai.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/openai/script_generator_openai.py b/examples/openai/script_generator_openai.py index 119f67e5..13b40530 100644 --- a/examples/openai/script_generator_openai.py +++ b/examples/openai/script_generator_openai.py @@ -5,7 +5,7 @@ Basic example of scraping pipeline using SmartScraper import os import json from dotenv import load_dotenv -from scrapegraphai.graphs import SmartScraperGraph +from scrapegraphai.graphs import ScriptCreatorGraph from scrapegraphai.utils import prettify_exec_info load_dotenv() @@ -28,9 +28,10 @@ graph_config = { # Create the SmartScraperGraph instance and run it # ************************************************ -smart_scraper_graph = SmartScraperGraph( - prompt="List me what does the company do, the name and a contact email.", - source="https://scrapegraphai.com/", +smart_scraper_graph = ScriptCreatorGraph( + prompt="List me all the news with their description.", + # also accepts a string with the already downloaded HTML code + source="https://perinim.github.io/projects", config=graph_config )