Update script_generator_openai.py

This commit is contained in:
Marco Vinciguerra 2024-09-12 09:06:15 +02:00
parent fe3aa28fe7
commit 9eb40e1eae

View File

@ -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
)