Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
refactoring of examples
Marco Vinciguerra8bd8fb0859b5
diff --git a/examples/anthropic/search_graph_schema_haiku.py b/examples/anthropic/search_graph_schema_haiku.pyindex 649f8497..19eebf09 100644--- a/examples/anthropic/search_graph_schema_haiku.py+++ b/examples/anthropic/search_graph_schema_haiku.py@@ -7,7 +7,6 @@ from dotenv import load_dotenvload_dotenv()from scrapegraphai.graphs import SearchGraph-from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_infofrom pydantic import BaseModel, Fieldfrom typing import List@@ -45,14 +44,3 @@ search_graph = SearchGraph(result = search_graph.run()print(result)--# ************************************************-# Get graph execution info-# ************************************************--graph_exec_info = search_graph.get_execution_info()-print(prettify_exec_info(graph_exec_info))--# Save to json and csv-convert_to_csv(result, "result")-convert_to_json(result, "result")diff --git a/examples/bedrock/search_graph_bedrock.py b/examples/bedrock/search_graph_bedrock.pyindex 5ca5cfa8..9b32d3db 100644--- a/examples/bedrock/search_graph_bedrock.py+++ b/examples/bedrock/search_graph_bedrock.py@@ -4,7 +4,6 @@ Example of Search Graphfrom dotenv import load_dotenvfrom scrapegraphai.graphs import SearchGraph-from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_infoload_dotenv()@@ -33,14 +32,3 @@ search_graph = SearchGraph(result = search_graph.run()print(result)--# ************************************************-# Get graph execution info-# ************************************************--graph_exec_info = search_graph.get_execution_info()-print(prettify_exec_info(graph_exec_info))--# Save to json and csv-convert_to_csv(result, "result")-convert_to_json(result, "result")diff --git a/examples/deepseek/search_graph_deepseek.py b/examples/deepseek/search_graph_deepseek.pyindex 1ef42602..d607e1b1 100644--- a/examples/deepseek/search_graph_deepseek.py+++ b/examples/deepseek/search_graph_deepseek.py@@ -5,7 +5,6 @@ Example of Search Graphimport osfrom dotenv import load_dotenvfrom scrapegraphai.graphs import SearchGraph-from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_infoload_dotenv()# ************************************************@@ -40,14 +39,3 @@ search_graph = SearchGraph(result = search_graph.run()print(result)--# ************************************************-# Get graph execution info-# ************************************************--graph_exec_info = search_graph.get_execution_info()-print(prettify_exec_info(graph_exec_info))--# Save to json and csv-convert_to_csv(result, "result")-convert_to_json(result, "result")diff --git a/examples/ernie/search_graph_ernie.py b/examples/ernie/search_graph_ernie.pyindex 7f40ebde..22802c6e 100644--- a/examples/ernie/search_graph_ernie.py+++ b/examples/ernie/search_graph_ernie.py@@ -5,7 +5,7 @@ Example of Search Graphimport osfrom dotenv import load_dotenvfrom scrapegraphai.graphs import SearchGraph-from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info+load_dotenv()# ************************************************@@ -34,14 +34,3 @@ search_graph = SearchGraph(result = search_graph.run()print(result)--# ************************************************-# Get graph execution info-# ************************************************--graph_exec_info = search_graph.get_execution_info()-print(prettify_exec_info(graph_exec_info))--# Save to json and csv-convert_to_csv(result, "result")-convert_to_json(result, "result")diff --git a/examples/fireworks/search_graph_fireworks.py b/examples/fireworks/search_graph_fireworks.pyindex 545bbde8..4d4d33cb 100644--- a/examples/fireworks/search_graph_fireworks.py+++ b/examples/fireworks/search_graph_fireworks.py@@ -5,7 +5,6 @@ Example of Search Graphimport osfrom dotenv import load_dotenvfrom scrapegraphai.graphs import SearchGraph-from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_infoload_dotenv()@@ -43,14 +42,3 @@ search_graph = SearchGraph(result = search_graph.run()print(result)--# ************************************************-# Get graph execution info-# ************************************************--graph_exec_info = search_graph.get_execution_info()-print(prettify_exec_info(graph_exec_info))--# Save to json and csv-convert_to_csv(result, "result")-convert_to_json(result, "result")diff --git a/examples/oneapi/search_graph_oneapi.py b/examples/oneapi/search_graph_oneapi.pyindex 6756f33b..d5b1ea44 100644--- a/examples/oneapi/search_graph_oneapi.py+++ b/examples/oneapi/search_graph_oneapi.py@@ -3,7 +3,6 @@ Example of Search Graph"""from scrapegraphai.graphs import SearchGraph-from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info# ************************************************# Define the configuration for the graph@@ -29,14 +28,3 @@ search_graph = SearchGraph(result = search_graph.run()print(result)--# ************************************************-# Get graph execution info-# ************************************************--graph_exec_info = search_graph.get_execution_info()-print(prettify_exec_info(graph_exec_info))--# Save to json and csv-convert_to_csv(result, "result")-convert_to_json(result, "result")diff --git a/examples/openai/search_graph_openai.py b/examples/openai/search_graph_openai.pyindex 7f40ebde..fbc5e0ec 100644--- a/examples/openai/search_graph_openai.py+++ b/examples/openai/search_graph_openai.py@@ -5,7 +5,6 @@ Example of Search Graphimport osfrom dotenv import load_dotenvfrom scrapegraphai.graphs import SearchGraph-from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_infoload_dotenv()# ************************************************@@ -34,14 +33,3 @@ search_graph = SearchGraph(result = search_graph.run()print(result)--# ************************************************-# Get graph execution info-# ************************************************--graph_exec_info = search_graph.get_execution_info()-print(prettify_exec_info(graph_exec_info))--# Save to json and csv-convert_to_csv(result, "result")-convert_to_json(result, "result")