Skip to content

Python scraper based on AI

add xml_example

VinciGit00f8917320b33f
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