Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
add xml_example
VinciGit00f8917320b33f
diff --git a/examples/openai/result.json b/examples/openai/result.jsondeleted file mode 100644index 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 filediff --git a/examples/openai/scrape_xml_openai.py b/examples/openai/scrape_xml_openai.pyindex 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 documentsimport osfrom dotenv import load_dotenv-from scrapegraphai.graphs import SmartScraperGraph+from scrapegraphai.graphs import XmlScraperGraphfrom scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_infoload_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 objectconfig=graph_config