From f8917320b33fa5256706b32994cae3043493d421 Mon Sep 17 00:00:00 2001 From: VinciGit00 Date: Mon, 29 Apr 2024 16:15:24 +0200 Subject: [PATCH] add xml_example --- examples/openai/result.json | 1 - examples/openai/scrape_xml_openai.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 examples/openai/result.json diff --git a/examples/openai/result.json b/examples/openai/result.json deleted file mode 100644 index b5e82a18..00000000 --- a/examples/openai/result.json +++ /dev/null @@ -1 +0,0 @@ -{"books": [{"title": "XML Developer's Guide", "author": "Unknown", "genre": "Unknown"}]} \ No newline at end of file diff --git a/examples/openai/scrape_xml_openai.py b/examples/openai/scrape_xml_openai.py index 854c5422..402277f3 100644 --- a/examples/openai/scrape_xml_openai.py +++ b/examples/openai/scrape_xml_openai.py @@ -4,7 +4,7 @@ Basic example of scraping pipeline using SmartScraper from XML documents import os from dotenv import load_dotenv -from scrapegraphai.graphs import SmartScraperGraph +from scrapegraphai.graphs import XmlScraperGraph from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info load_dotenv() @@ -33,10 +33,10 @@ graph_config = { } # ************************************************ -# Create the SmartScraperGraph instance and run it +# Create the XmlScraperGraph instance and run it # ************************************************ -smart_scraper_graph = SmartScraperGraph( +smart_scraper_graph = XmlScraperGraph( prompt="List me all the authors, title and genres of the books", source=text, # Pass the content of the file, not the file object config=graph_config