Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
add examples multi concat
Marco Vinciguerra9e9c77551fdc
diff --git a/examples/anthropic/smart_scraper_multi_concat_haiku.py b/examples/anthropic/smart_scraper_multi_concat_haiku.pynew file mode 100644index 00000000..5faa60c8--- /dev/null+++ b/examples/anthropic/smart_scraper_multi_concat_haiku.py@@ -0,0 +1,39 @@+"""+Basic example of scraping pipeline using SmartScraper+"""++import os+import json+from dotenv import load_dotenv+from scrapegraphai.graphs import SmartScraperMultiConcatGraph++load_dotenv()++# ************************************************+# Create the SmartScraperGraph instance and run it+# ************************************************++graph_config = {+ "llm": {+ "api_key": os.getenv("ANTHROPIC_API_KEY"),+ "model": "anthropic/claude-3-haiku-20240307",+ },+}+++# *******************************************************+# Create the SmartScraperMultiGraph instance and run it+# *******************************************************++multiple_search_graph = SmartScraperMultiConcatGraph(+ prompt="Who is Marco Perini?",+ source= [+ "https://perinim.github.io/",+ "https://perinim.github.io/cv/"+ ],+ schema=None,+ config=graph_config+)++result = multiple_search_graph.run()+print(json.dumps(result, indent=4))diff --git a/examples/azure/smart_scraper_multi_azure.py b/examples/azure/smart_scraper_multi_azure.pyindex a4f26d7e..f1f3451e 100644--- a/examples/azure/smart_scraper_multi_azure.py+++ b/examples/azure/smart_scraper_multi_azure.py@@ -1,8 +1,8 @@"""Basic example of scraping pipeline using SmartScraper"""--import os, json+import os+import jsonfrom dotenv import load_dotenvfrom scrapegraphai.graphs import SmartScraperMultiGraphdiff --git a/examples/azure/smart_scraper_multi_concat_azure.py b/examples/azure/smart_scraper_multi_concat_azure.pynew file mode 100644index 00000000..e3870a4c--- /dev/null+++ b/examples/azure/smart_scraper_multi_concat_azure.py@@ -0,0 +1,39 @@+"""+Basic example of scraping pipeline using SmartScraper+"""++import os+import json+from dotenv import load_dotenv+from scrapegraphai.graphs import SmartScraperMultiConcatGraph++load_dotenv()++# ************************************************+# Define the configuration for the graph+# ************************************************+graph_config = {+ "llm": {+ "api_key": os.environ["AZURE_OPENAI_KEY"],+ "model": "azure_openai/gpt-3.5-turbo",+ },+ "verbose": True,+ "headless": False+}++# *******************************************************+# Create the SmartScraperMultiGraph instance and run it+# *******************************************************++multiple_search_graph = SmartScraperMultiConcatGraph(+ prompt="Who is Marco Perini?",+ source= [+ "https://perinim.github.io/",+ "https://perinim.github.io/cv/"+ ],+ schema=None,+ config=graph_config+)++result = multiple_search_graph.run()+print(json.dumps(result, indent=4))diff --git a/examples/bedrock/smart_scraper_multi_bedrock.py b/examples/bedrock/smart_scraper_multi_bedrock.pyindex b363d6ab..bbff3d12 100644--- a/examples/bedrock/smart_scraper_multi_bedrock.py+++ b/examples/bedrock/smart_scraper_multi_bedrock.py@@ -1,12 +1,9 @@"""Basic example of scraping pipeline using SmartScraper"""--import os, json-from dotenv import load_dotenv+import jsonfrom scrapegraphai.graphs import SmartScraperMultiGraph-load_dotenv()# ************************************************# Define the configuration for the graphdiff --git a/examples/bedrock/smart_scraper_multi_concat_bedrock.py b/examples/bedrock/smart_scraper_multi_concat_bedrock.pynew file mode 100644index 00000000..74c30a3f--- /dev/null+++ b/examples/bedrock/smart_scraper_multi_concat_bedrock.py@@ -0,0 +1,35 @@+"""+Basic example of scraping pipeline using SmartScraper+"""+import json+from scrapegraphai.graphs import SmartScraperMultiConcatGraph++# ************************************************+# Define the configuration for the graph+# ************************************************++graph_config = {+ "llm": {+ "client": "client_name",+ "model": "bedrock/anthropic.claude-3-sonnet-20240229-v1:0",+ "temperature": 0.0+ }+}+++# *******************************************************+# Create the SmartScraperMultiGraph instance and run it+# *******************************************************++multiple_search_graph = SmartScraperMultiConcatGraph(+ prompt="Who is Marco Perini?",+ source= [+ "https://perinim.github.io/",+ "https://perinim.github.io/cv/"+ ],+ schema=None,+ config=graph_config+)++result = multiple_search_graph.run()+print(json.dumps(result, indent=4))diff --git a/examples/deepseek/smart_scraper_deepseek.py b/examples/deepseek/smart_scraper_deepseek.pyindex 4c49b160..c94a5a80 100644--- a/examples/deepseek/smart_scraper_deepseek.py+++ b/examples/deepseek/smart_scraper_deepseek.py@@ -9,7 +9,6 @@ from scrapegraphai.utils import prettify_exec_infoload_dotenv()-# ************************************************# Define the configuration for the graph# ************************************************diff --git a/examples/deepseek/smart_scraper_multi_concat_deepseek.py b/examples/deepseek/smart_scraper_multi_concat_deepseek.pynew file mode 100644index 00000000..bf6c0c53--- /dev/null+++ b/examples/deepseek/smart_scraper_multi_concat_deepseek.py@@ -0,0 +1,42 @@+"""+Basic example of scraping pipeline using SmartScraper+"""++import os+import json+from dotenv import load_dotenv+from scrapegraphai.graphs import SmartScraperMultiConcatGraph++load_dotenv()++# ************************************************+# Define the configuration for the graph+# ************************************************++deepseek_key = os.getenv("DEEPSEEK_APIKEY")++graph_config = {+ "llm": {+ "model": "deepseek/deepseek-chat",+ "api_key": deepseek_key,+ },+ "verbose": True,+}+++# *******************************************************+# Create the SmartScraperMultiGraph instance and run it+# *******************************************************++multiple_search_graph = SmartScraperMultiConcatGraph(+ prompt="Who is Marco Perini?",+ source= [+ "https://perinim.github.io/",+ "https://perinim.github.io/cv/"+ ],+ schema=None,+ config=graph_config+)++result = multiple_search_graph.run()+print(json.dumps(result, indent=4))diff --git a/examples/ernie/smart_scraper_ernie.py b/examples/ernie/smart_scraper_ernie.pyindex 56084dad..9fcc7820 100644--- a/examples/ernie/smart_scraper_ernie.py+++ b/examples/ernie/smart_scraper_ernie.py@@ -2,19 +2,14 @@Basic example of scraping pipeline using SmartScraper"""-import os-from dotenv import load_dotenvfrom scrapegraphai.graphs import SmartScraperGraphfrom scrapegraphai.utils import prettify_exec_info-load_dotenv()--# ************************************************# Define the configuration for the graph# ************************************************-graph_config = {+graph_config = {"llm": {"model": "ernie/ernie-bot-turbo","ernie_client_id": "<ernie_client_id>",diff --git a/examples/ernie/smart_scraper_multi_concat_ernie.py b/examples/ernie/smart_scraper_multi_concat_ernie.pynew file mode 100644index 00000000..5be9898d--- /dev/null+++ b/examples/ernie/smart_scraper_multi_concat_ernie.py@@ -0,0 +1,35 @@+"""+Basic example of scraping pipeline using SmartScraper+"""+import json+from scrapegraphai.graphs import SmartScraperMultiConcatGraph++# ************************************************+# Define the configuration for the graph+# ************************************************+graph_config = {+ "llm": {+ "model": "ernie/ernie-bot-turbo",+ "ernie_client_id": "<ernie_client_id>",+ "ernie_client_secret": "<ernie_client_secret>",+ "temperature": 0.1+ },+ "library": "beautifulsoup"+}++# *******************************************************+# Create the SmartScraperMultiGraph instance and run it+# *******************************************************++multiple_search_graph = SmartScraperMultiConcatGraph(+ prompt="Who is Marco Perini?",+ source= [+ "https://perinim.github.io/",+ "https://perinim.github.io/cv/"+ ],+ schema=None,+ config=graph_config+)++result = multiple_search_graph.run()+print(json.dumps(result, indent=4))diff --git a/examples/fireworks/smart_scraper_fireworks.py b/examples/fireworks/smart_scraper_fireworks.pyindex cff9aedb..778f1a07 100644--- a/examples/fireworks/smart_scraper_fireworks.py+++ b/examples/fireworks/smart_scraper_fireworks.py@@ -1,8 +1,8 @@"""Basic example of scraping pipeline using SmartScraper"""--import os, json+import os+import jsonfrom dotenv import load_dotenvfrom scrapegraphai.graphs import SmartScraperGraphfrom scrapegraphai.utils import prettify_exec_infodiff --git a/examples/fireworks/smart_scraper_multi_concat_fireworks.py b/examples/fireworks/smart_scraper_multi_concat_fireworks.pynew file mode 100644index 00000000..c0da49a3--- /dev/null+++ b/examples/fireworks/smart_scraper_multi_concat_fireworks.py@@ -0,0 +1,37 @@+"""+Basic example of scraping pipeline using SmartScraper+"""+import os+import json+from dotenv import load_dotenv+from scrapegraphai.graphs import SmartScraperMultiConcatGraph++load_dotenv()++fireworks_api_key = os.getenv("FIREWORKS_APIKEY")++graph_config = {+ "llm": {+ "api_key": fireworks_api_key,+ "model": "fireworks/accounts/fireworks/models/mixtral-8x7b-instruct"+ },+ "verbose": True,+ "headless": False,+}++# *******************************************************+# Create the SmartScraperMultiGraph instance and run it+# *******************************************************++multiple_search_graph = SmartScraperMultiConcatGraph(+ prompt="Who is Marco Perini?",+ source= [+ "https://perinim.github.io/",+ "https://perinim.github.io/cv/"+ ],+ schema=None,+ config=graph_config+)++result = multiple_search_graph.run()+print(json.dumps(result, indent=4))diff --git a/examples/google_vertexai/smart_scraper_gemini.py b/examples/google_vertexai/smart_scraper_gemini.pyindex 0888d656..4ed7c352 100644--- a/examples/google_vertexai/smart_scraper_gemini.py+++ b/examples/google_vertexai/smart_scraper_gemini.py@@ -6,8 +6,8 @@ import osfrom dotenv import load_dotenvfrom scrapegraphai.utils import prettify_exec_infofrom scrapegraphai.graphs import SmartScraperGraph-load_dotenv()+load_dotenv()# ************************************************# Define the configuration for the graphdiff --git a/examples/google_vertexai/smart_scraper_multi_concat_gemini.py b/examples/google_vertexai/smart_scraper_multi_concat_gemini.pynew file mode 100644index 00000000..c6874ff6--- /dev/null+++ b/examples/google_vertexai/smart_scraper_multi_concat_gemini.py@@ -0,0 +1,36 @@+"""+Basic example of scraping pipeline using SmartScraper+"""++import os+import json+from dotenv import load_dotenv+from scrapegraphai.graphs import SmartScraperMultiConcatGraph++load_dotenv()++gemini_key = os.getenv("GOOGLE_APIKEY")++graph_config = {+ "llm": {+ "api_key": gemini_key,+ "model": "google_vertexai/gemini-1.5-pro",+ },+}++# *******************************************************+# Create the SmartScraperMultiGraph instance and run it+# *******************************************************++multiple_search_graph = SmartScraperMultiConcatGraph(+ prompt="Who is Marco Perini?",+ source= [+ "https://perinim.github.io/",+ "https://perinim.github.io/cv/"+ ],+ schema=None,+ config=graph_config+)++result = multiple_search_graph.run()+print(json.dumps(result, indent=4))diff --git a/examples/groq/smart_scraper_multi_concat_groq.py b/examples/groq/smart_scraper_multi_concat_groq.pynew file mode 100644index 00000000..038ca37c--- /dev/null+++ b/examples/groq/smart_scraper_multi_concat_groq.py@@ -0,0 +1,42 @@+"""+Basic example of scraping pipeline using SmartScraper+"""++import os+import json+from dotenv import load_dotenv+from scrapegraphai.graphs import SmartScraperMultiConcatGraph++load_dotenv()++# ************************************************+# Define the configuration for the graph+# ************************************************++groq_key = os.getenv("GROQ_APIKEY")++graph_config = {+ "llm": {+ "model": "groq/gemma-7b-it",+ "api_key": groq_key,+ "temperature": 0+ },+ "headless": False+}++# *******************************************************+# Create the SmartScraperMultiGraph instance and run it+# *******************************************************++multiple_search_graph = SmartScraperMultiConcatGraph(+ prompt="Who is Marco Perini?",+ source= [+ "https://perinim.github.io/",+ "https://perinim.github.io/cv/"+ ],+ schema=None,+ config=graph_config+)++result = multiple_search_graph.run()+print(json.dumps(result, indent=4))diff --git a/examples/huggingfacehub/smart_scraper_huggingfacehub.py b/examples/huggingfacehub/smart_scraper_huggingfacehub.pyindex 6f9a863f..a50b574e 100644--- a/examples/huggingfacehub/smart_scraper_huggingfacehub.py+++ b/examples/huggingfacehub/smart_scraper_huggingfacehub.py@@ -10,8 +10,6 @@ from langchain_community.llms import HuggingFaceEndpointfrom langchain_community.embeddings import HuggingFaceInferenceAPIEmbeddings--## required environment variable in .env#HUGGINGFACEHUB_API_TOKENload_dotenv()diff --git a/examples/huggingfacehub/smart_scraper_multi_concat_huggingfacehub.py b/examples/huggingfacehub/smart_scraper_multi_concat_huggingfacehub.pynew file mode 100644index 00000000..3f2d7135--- /dev/null+++ b/examples/huggingfacehub/smart_scraper_multi_concat_huggingfacehub.py@@ -0,0 +1,53 @@+"""+Basic example of scraping pipeline using SmartScraper+"""++import os+import json+from dotenv import load_dotenv+from scrapegraphai.graphs import SmartScraperMultiConcatGraph+from langchain_community.llms import HuggingFaceEndpoint+from langchain_community.embeddings import HuggingFaceInferenceAPIEmbeddings++load_dotenv()++HUGGINGFACEHUB_API_TOKEN = os.getenv('HUGGINGFACEHUB_API_TOKEN')+# ************************************************+# Initialize the model instances+# ************************************************++repo_id = "mistralai/Mistral-7B-Instruct-v0.2"++llm_model_instance = HuggingFaceEndpoint(+ repo_id=repo_id, max_length=128, temperature=0.5, token=HUGGINGFACEHUB_API_TOKEN+)+++embedder_model_instance = HuggingFaceInferenceAPIEmbeddings(+ api_key=HUGGINGFACEHUB_API_TOKEN, model_name="sentence-transformers/all-MiniLM-l6-v2"+)++# ************************************************+# Create the SmartScraperGraph instance and run it+# ************************************************++graph_config = {+ "llm": {"model_instance": llm_model_instance},+}++# *******************************************************+# Create the SmartScraperMultiGraph instance and run it+# *******************************************************++multiple_search_graph = SmartScraperMultiConcatGraph(+ prompt="Who is Marco Perini?",+ source= [+ "https://perinim.github.io/",+ "https://perinim.github.io/cv/"+ ],+ schema=None,+ config=graph_config+)++result = multiple_search_graph.run()+print(json.dumps(result, indent=4))diff --git a/examples/mistral/smart_scraper_mistral.py b/examples/mistral/smart_scraper_mistral.pyindex 7291a40a..a2f82504 100644--- a/examples/mistral/smart_scraper_mistral.py+++ b/examples/mistral/smart_scraper_mistral.py@@ -1,11 +1,11 @@"""Basic example of scraping pipeline using SmartScraper"""--import os, json-from scrapegraphai.graphs import SmartScraperGraph-from scrapegraphai.utils import prettify_exec_info+import os+import jsonfrom dotenv import load_dotenv+from scrapegraphai.graphs import SmartScraperGraph+load_dotenv()# ************************************************@@ -34,10 +34,3 @@ smart_scraper_graph = SmartScraperGraph(result = smart_scraper_graph.run()print(json.dumps(result, indent=4))--# ************************************************-# Get graph execution info-# ************************************************--graph_exec_info = smart_scraper_graph.get_execution_info()-print(prettify_exec_info(graph_exec_info))diff --git a/examples/mistral/smart_scraper_multi_concat_mistral.py b/examples/mistral/smart_scraper_multi_concat_mistral.pynew file mode 100644index 00000000..cef9e16e--- /dev/null+++ b/examples/mistral/smart_scraper_multi_concat_mistral.py@@ -0,0 +1,39 @@+"""+Basic example of scraping pipeline using SmartScraper+"""++import os+import json+from dotenv import load_dotenv+from scrapegraphai.graphs import SmartScraperMultiConcatGraph++load_dotenv()++# ************************************************+# Define the configuration for the graph+# ************************************************+graph_config = {+ "llm": {+ "api_key": os.getenv("MISTRAL_API_KEY"),+ "model": "mistralai/open-mistral-nemo",+ },+ "verbose": True,+ "headless": False,+}++# *******************************************************+# Create the SmartScraperMultiGraph instance and run it+# *******************************************************++multiple_search_graph = SmartScraperMultiConcatGraph(+ prompt="Who is Marco Perini?",+ source= [+ "https://perinim.github.io/",+ "https://perinim.github.io/cv/"+ ],+ schema=None,+ config=graph_config+)++result = multiple_search_graph.run()+print(json.dumps(result, indent=4))diff --git a/examples/mixed_models/.env.example b/examples/mixed_models/.env.exampledeleted file mode 100644index ee2490d5..00000000--- a/examples/mixed_models/.env.example+++ /dev/null@@ -1,5 +0,0 @@-OPENAI_APIKEY="your openai api key"-GOOGLE_APIKEY="your google api key"-AZURE_OPENAI_API_KEY="your azure api key"-AZURE_OPENAI_ENDPOINT="https://<your-endpoint>.openai.azure.com/"-GROQ_APIKEY= "your groq key"\ No newline at end of filediff --git a/examples/mixed_models/custom_graph_groq_openai.py b/examples/mixed_models/custom_graph_groq_openai.pydeleted file mode 100644index d83c31db..00000000--- a/examples/mixed_models/custom_graph_groq_openai.py+++ /dev/null@@ -1,118 +0,0 @@-"""-Example of custom graph using existing nodes-"""--import os-from dotenv import load_dotenv--from langchain_openai import OpenAIEmbeddings-from langchain_openai import ChatOpenAI-from scrapegraphai.graphs import BaseGraph-from scrapegraphai.nodes import FetchNode, ParseNode, RAGNode, GenerateAnswerNode, RobotsNode-load_dotenv()--# ************************************************-# Define the configuration for the graph-# ************************************************-groq_key = os.getenv("GROQ_APIKEY")-openai_key = os.getenv("OPENAI_APIKEY")--graph_config = {- "llm": {- "model": "groq/gemma-7b-it",- "api_key": groq_key,- "temperature": 0- },- "embeddings": {- "api_key": openai_key,- "model": "openai",- },- "verbose": True,- "headless": False-}--# ************************************************-# Define the graph nodes-# ************************************************--llm_model = OpenAI(graph_config["llm"])-embedder = OpenAIEmbeddings(api_key=llm_model.openai_api_key)--# define the nodes for the graph-robot_node = RobotsNode(- input="url",- output=["is_scrapable"],- node_config={- "llm_model": llm_model,- "force_scraping": True,- "verbose": True,- }-)--fetch_node = FetchNode(- input="url | local_dir",- output=["doc"],- node_config={- "verbose": True,- "headless": True,- }-)-parse_node = ParseNode(- input="doc",- output=["parsed_doc"],- node_config={- "chunk_size": 4096,- "verbose": True,- }-)-rag_node = RAGNode(- input="user_prompt & (parsed_doc | doc)",- output=["relevant_chunks"],- node_config={- "llm_model": llm_model,- "embedder_model": embedder,- "verbose": True,- }-)-generate_answer_node = GenerateAnswerNode(- input="user_prompt & (relevant_chunks | parsed_doc | doc)",- output=["answer"],- node_config={- "llm_model": llm_model,- "verbose": True,- }-)--# ************************************************-# Create the graph by defining the connections-# ************************************************--graph = BaseGraph(- nodes=[- robot_node,- fetch_node,- parse_node,- rag_node,- generate_answer_node,- ],- edges=[- (robot_node, fetch_node),- (fetch_node, parse_node),- (parse_node, rag_node),- (rag_node, generate_answer_node)- ],- entry_point=robot_node-)--# ************************************************-# Execute the graph-# ************************************************--result, execution_info = graph.execute({- "user_prompt": "Describe the content",- "url": "https://example.com/"-})--# get the answer from the result-result = result.get("answer", "No answer found.")-print(result)diff --git a/examples/mixed_models/inputs/books.xml b/examples/mixed_models/inputs/books.xmldeleted file mode 100644index e3d1fe87..00000000--- a/examples/mixed_models/inputs/books.xml+++ /dev/null@@ -1,120 +0,0 @@-<?xml version="1.0"?>-<catalog>- <book id="bk101">- <author>Gambardella, Matthew</author>- <title>XML Developer's Guide</title>- <genre>Computer</genre>- <price>44.95</price>- <publish_date>2000-10-01</publish_date>- <description>An in-depth look at creating applications- with XML.</description>- </book>- <book id="bk102">- <author>Ralls, Kim</author>- <title>Midnight Rain</title>- <genre>Fantasy</genre>- <price>5.95</price>- <publish_date>2000-12-16</publish_date>- <description>A former architect battles corporate zombies,- an evil sorceress, and her own childhood to become queen- of the world.</description>- </book>- <book id="bk103">- <author>Corets, Eva</author>- <title>Maeve Ascendant</title>- <genre>Fantasy</genre>- <price>5.95</price>- <publish_date>2000-11-17</publish_date>- <description>After the collapse of a nanotechnology- society in England, the young survivors lay the- foundation for a new society.</description>- </book>- <book id="bk104">- <author>Corets, Eva</author>- <title>Oberon's Legacy</title>- <genre>Fantasy</genre>- <price>5.95</price>- <publish_date>2001-03-10</publish_date>- <description>In post-apocalypse England, the mysterious- agent known only as Oberon helps to create a new life- for the inhabitants of London. Sequel to Maeve- Ascendant.</description>- </book>- <book id="bk105">- <author>Corets, Eva</author>- <title>The Sundered Grail</title>- <genre>Fantasy</genre>- <price>5.95</price>- <publish_date>2001-09-10</publish_date>- <description>The two daughters of Maeve, half-sisters,- battle one another for control of England. Sequel to- Oberon's Legacy.</description>- </book>- <book id="bk106">- <author>Randall, Cynthia</author>- <title>Lover Birds</title>- <genre>Romance</genre>- <price>4.95</price>- <publish_date>2000-09-02</publish_date>- <description>When Carla meets Paul at an ornithology- conference, tempers fly as feathers get ruffled.</description>- </book>- <book id="bk107">- <author>Thurman, Paula</author>- <title>Splish Splash</title>- <genre>Romance</genre>- <price>4.95</price>- <publish_date>2000-11-02</publish_date>- <description>A deep sea diver finds true love twenty- thousand leagues beneath the sea.</description>- </book>- <book id="bk108">- <author>Knorr, Stefan</author>- <title>Creepy Crawlies</title>- <genre>Horror</genre>- <price>4.95</price>- <publish_date>2000-12-06</publish_date>- <description>An anthology of horror stories about roaches,- centipedes, scorpions and other insects.</description>- </book>- <book id="bk109">- <author>Kress, Peter</author>- <title>Paradox Lost</title>- <genre>Science Fiction</genre>- <price>6.95</price>- <publish_date>2000-11-02</publish_date>- <description>After an inadvertant trip through a Heisenberg- Uncertainty Device, James Salway discovers the problems- of being quantum.</description>- </book>- <book id="bk110">- <author>O'Brien, Tim</author>- <title>Microsoft .NET: The Programming Bible</title>- <genre>Computer</genre>- <price>36.95</price>- <publish_date>2000-12-09</publish_date>- <description>Microsoft's .NET initiative is explored in- detail in this deep programmer's reference.</description>- </book>- <book id="bk111">- <author>O'Brien, Tim</author>- <title>MSXML3: A Comprehensive Guide</title>- <genre>Computer</genre>- <price>36.95</price>- <publish_date>2000-12-01</publish_date>- <description>The Microsoft MSXML3 parser is covered in- detail, with attention to XML DOM interfaces, XSLT processing,- SAX and more.</description>- </book>- <book id="bk112">- <author>Galos, Mike</author>- <title>Visual Studio 7: A Comprehensive Guide</title>- <genre>Computer</genre>- <price>49.95</price>- <publish_date>2001-04-16</publish_date>- <description>Microsoft Visual Studio 7 is explored in depth,- looking at how Visual Basic, Visual C++, C#, and ASP+ are- integrated into a comprehensive development- environment.</description>- </book>-</catalog>\ No newline at end of filediff --git a/examples/mixed_models/inputs/example.json b/examples/mixed_models/inputs/example.jsondeleted file mode 100644index 2263184c..00000000--- a/examples/mixed_models/inputs/example.json+++ /dev/null@@ -1,182 +0,0 @@-{- "kind":"youtube#searchListResponse",- "etag":"q4ibjmYp1KA3RqMF4jFLl6PBwOg",- "nextPageToken":"CAUQAA",- "regionCode":"NL",- "pageInfo":{- "totalResults":1000000,- "resultsPerPage":5- },- "items":[- {- "kind":"youtube#searchResult",- "etag":"QCsHBifbaernVCbLv8Cu6rAeaDQ",- "id":{- "kind":"youtube#video",- "videoId":"TvWDY4Mm5GM"- },- "snippet":{- "publishedAt":"2023-07-24T14:15:01Z",- "channelId":"UCwozCpFp9g9x0wAzuFh0hwQ",- "title":"3 Football Clubs Kylian Mbappe Should Avoid Signing ✍️❌⚽️ #football #mbappe #shorts",- "description":"",- "thumbnails":{- "default":{- "url":"https://i.ytimg.com/vi/TvWDY4Mm5GM/default.jpg",- "width":120,- "height":90- },- "medium":{- "url":"https://i.ytimg.com/vi/TvWDY4Mm5GM/mqdefault.jpg",- "width":320,- "height":180- },- "high":{- "url":"https://i.ytimg.com/vi/TvWDY4Mm5GM/hqdefault.jpg",- "width":480,- "height":360- }- },- "channelTitle":"FC Motivate",- "liveBroadcastContent":"none",- "publishTime":"2023-07-24T14:15:01Z"- }- },- {- "kind":"youtube#searchResult",- "etag":"0NG5QHdtIQM_V-DBJDEf-jK_Y9k",- "id":{- "kind":"youtube#video",- "videoId":"aZM_42CcNZ4"- },- "snippet":{- "publishedAt":"2023-07-24T16:09:27Z",- "channelId":"UCM5gMM_HqfKHYIEJ3lstMUA",- "title":"Which Football Club Could Cristiano Ronaldo Afford To Buy? 💰",- "description":"Sign up to Sorare and get a FREE card: https://sorare.pxf.io/NellisShorts Give Soraredata a go for FREE: ...",- "thumbnails":{- "default":{- "url":"https://i.ytimg.com/vi/aZM_42CcNZ4/default.jpg",- "width":120,- "height":90- },- "medium":{- "url":"https://i.ytimg.com/vi/aZM_42CcNZ4/mqdefault.jpg",- "width":320,- "height":180- },- "high":{- "url":"https://i.ytimg.com/vi/aZM_42CcNZ4/hqdefault.jpg",- "width":480,- "height":360- }- },- "channelTitle":"John Nellis",- "liveBroadcastContent":"none",- "publishTime":"2023-07-24T16:09:27Z"- }- },- {- "kind":"youtube#searchResult",- "etag":"WbBz4oh9I5VaYj91LjeJvffrBVY",- "id":{- "kind":"youtube#video",- "videoId":"wkP3XS3aNAY"- },- "snippet":{- "publishedAt":"2023-07-24T16:00:50Z",- "channelId":"UC4EP1dxFDPup_aFLt0ElsDw",- "title":"PAULO DYBALA vs THE WORLD'S LONGEST FREEKICK WALL",- "description":"Can Paulo Dybala curl a football around the World's longest free kick wall? We met up with the World Cup winner and put him to ...",- "thumbnails":{- "default":{- "url":"https://i.ytimg.com/vi/wkP3XS3aNAY/default.jpg",- "width":120,- "height":90- },- "medium":{- "url":"https://i.ytimg.com/vi/wkP3XS3aNAY/mqdefault.jpg",- "width":320,- "height":180- },- "high":{- "url":"https://i.ytimg.com/vi/wkP3XS3aNAY/hqdefault.jpg",- "width":480,- "height":360- }- },- "channelTitle":"Shoot for Love",- "liveBroadcastContent":"none",- "publishTime":"2023-07-24T16:00:50Z"- }- },- {- "kind":"youtube#searchResult",- "etag":"juxv_FhT_l4qrR05S1QTrb4CGh8",- "id":{- "kind":"youtube#video",- "videoId":"rJkDZ0WvfT8"- },- "snippet":{- "publishedAt":"2023-07-24T10:00:39Z",- "channelId":"UCO8qj5u80Ga7N_tP3BZWWhQ",- "title":"TOP 10 DEFENDERS 2023",- "description":"SoccerKingz https://soccerkingz.nl Use code: 'ILOVEHOF' to get 10% off. TOP 10 DEFENDERS 2023 Follow us! • Instagram ...",- "thumbnails":{- "default":{- "url":"https://i.ytimg.com/vi/rJkDZ0WvfT8/default.jpg",- "width":120,- "height":90- },- "medium":{- "url":"https://i.ytimg.com/vi/rJkDZ0WvfT8/mqdefault.jpg",- "width":320,- "height":180- },- "high":{- "url":"https://i.ytimg.com/vi/rJkDZ0WvfT8/hqdefault.jpg",- "width":480,- "height":360- }- },- "channelTitle":"Home of Football",- "liveBroadcastContent":"none",- "publishTime":"2023-07-24T10:00:39Z"- }- },- {- "kind":"youtube#searchResult",- "etag":"wtuknXTmI1txoULeH3aWaOuXOow",- "id":{- "kind":"youtube#video",- "videoId":"XH0rtu4U6SE"- },- "snippet":{- "publishedAt":"2023-07-21T16:30:05Z",- "channelId":"UCwozCpFp9g9x0wAzuFh0hwQ",- "title":"3 Things You Didn't Know About Erling Haaland ⚽️🇳🇴 #football #haaland #shorts",- "description":"",- "thumbnails":{- "default":{- "url":"https://i.ytimg.com/vi/XH0rtu4U6SE/default.jpg",- "width":120,- "height":90- },- "medium":{- "url":"https://i.ytimg.com/vi/XH0rtu4U6SE/mqdefault.jpg",- "width":320,- "height":180- },- "high":{- "url":"https://i.ytimg.com/vi/XH0rtu4U6SE/hqdefault.jpg",- "width":480,- "height":360- }- },- "channelTitle":"FC Motivate",- "liveBroadcastContent":"none",- "publishTime":"2023-07-21T16:30:05Z"- }- }- ]-}\ No newline at end of filediff --git a/examples/mixed_models/inputs/plain_html_example.txt b/examples/mixed_models/inputs/plain_html_example.txtdeleted file mode 100644index 78f814ae..00000000--- a/examples/mixed_models/inputs/plain_html_example.txt+++ /dev/null@@ -1,105 +0,0 @@-<body class="fixed-top-nav " style="padding-top: 57px;">- <header>- <nav id="navbar" class="navbar navbar-light navbar-expand-sm fixed-top">- <div class="container">- <a class="navbar-brand title font-weight-lighter" href="/"><span class="font-weight-bold">Marco </span>Perini</a> <button class="navbar-toggler collapsed ml-auto" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar top-bar"></span> <span class="icon-bar middle-bar"></span> <span class="icon-bar bottom-bar"></span> </button>- <div class="collapse navbar-collapse text-right" id="navbarNav">- <ul class="navbar-nav ml-auto flex-nowrap">- <li class="nav-item "> <a class="nav-link" href="/">About</a> </li>- <li class="nav-item dropdown active">- <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Projects<span class="sr-only">(current)</span></a>- <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">- <a class="dropdown-item" href="/projects/">Projects</a>- <div class="dropdown-divider"></div>- <a class="dropdown-item" href="/competitions/">Competitions</a>- </div>- </li>- <li class="nav-item "> <a class="nav-link" href="/cv/">CV</a> </li>- <li class="toggle-container"> <button id="light-toggle" title="Change theme"> <i class="fa-solid fa-moon"></i> <i class="fa-solid fa-sun"></i> </button> </li>- </ul>- </div>- </div>- </nav>- <progress id="progress" value="0" max="284" style="top: 57px;">- <div class="progress-container"> <span class="progress-bar"></span> </div>- </progress>- </header>- <div class="container mt-5">- <div class="post">- <header class="post-header">- <h1 class="post-title">Projects</h1>- <p class="post-description"></p>- </header>- <article>- <div class="projects">- <div class="grid" style="position: relative; height: 861.992px;">- <div class="grid-sizer"></div>- <div class="grid-item" style="position: absolute; left: 0px; top: 0px;">- <a href="/projects/rotary-pendulum-rl/">- <div class="card hoverable">- <figure>- <picture> <img src="/assets/img/rotary_pybullet.jpg" width="auto" height="auto" alt="project thumbnail" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"> </picture>- </figure>- <div class="card-body">- <h4 class="card-title">Rotary Pendulum RL</h4>- <p class="card-text">Open Source project aimed at controlling a real life rotary pendulum using RL algorithms</p>- <div class="row ml-1 mr-1 p-0"> </div>- </div>- </div>- </a>- </div>- <div class="grid-sizer"></div>- <div class="grid-item" style="position: absolute; left: 260px; top: 0px;">- <a href="https://github.com/PeriniM/DQN-SwingUp" rel="external nofollow noopener" target="_blank">- <div class="card hoverable">- <figure>- <picture> <img src="/assets/img/value-policy-heatmaps.jpg" width="auto" height="auto" alt="project thumbnail" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"> </picture>- </figure>- <div class="card-body">- <h4 class="card-title">DQN Implementation from scratch</h4>- <p class="card-text">Developed a Deep Q-Network algorithm to train a simple and double pendulum</p>- <div class="row ml-1 mr-1 p-0"> </div>- </div>- </div>- </a>- </div>- <div class="grid-sizer"></div>- <div class="grid-item" style="position: absolute; left: 0px; top: 447.414px;">- <a href="https://github.com/PeriniM/Multi-Agents-HAED" rel="external nofollow noopener" target="_blank">- <div class="card hoverable">- <figure>- <picture> <img src="/assets/img/multi_agents_haed.gif" width="auto" height="auto" alt="project thumbnail" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"> </picture>- </figure>- <div class="card-body">- <h4 class="card-title">Multi Agents HAED</h4>- <p class="card-text">University project which focuses on simulating a multi-agent system to perform environment mapping. Agents, equipped with sensors, explore and record their surroundings, considering uncertainties in their readings.</p>- <div class="row ml-1 mr-1 p-0"> </div>- </div>- </div>- </a>- </div>- <div class="grid-sizer"></div>- <div class="grid-item" style="position: absolute; left: 260px; top: 370.172px;">- <a href="/projects/wireless-esc-drone/">- <div class="card hoverable">- <figure>- <picture> <img src="/assets/img/wireless_esc.gif" width="auto" height="auto" alt="project thumbnail" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"> </picture>- </figure>- <div class="card-body">- <h4 class="card-title">Wireless ESC for Modular Drones</h4>- <p class="card-text">Modular drone architecture proposal and proof of concept. The project received maximum grade.</p>- <div class="row ml-1 mr-1 p-0"> </div>- </div>- </div>- </a>- </div>- </div>- </div>- </article>- </div>- </div>- <footer class="fixed-bottom">- <div class="container mt-0"> © Copyright 2023 Marco Perini. Powered by <a href="https://jekyllrb.com/" target="_blank" rel="external nofollow noopener">Jekyll</a> with <a href="https://github.com/alshedivat/al-folio" rel="external nofollow noopener" target="_blank">al-folio</a> theme. Hosted by <a href="https://pages.github.com/" target="_blank" rel="external nofollow noopener">GitHub Pages</a>. </div>- </footer>- <div class="hiddendiv common"></div>-</body>\ No newline at end of filediff --git a/examples/mixed_models/readme.md b/examples/mixed_models/readme.mddeleted file mode 100644index 9e739212..00000000--- a/examples/mixed_models/readme.md+++ /dev/null@@ -1 +0,0 @@-This folder contains an example of how to use ScrapeGraph-AI with mixed models. The example shows how to extract information from a website using a natural language prompt and a machine learning model.\ No newline at end of filediff --git a/examples/mixed_models/search_graph_groq_ollama.py b/examples/mixed_models/search_graph_groq_ollama.pydeleted file mode 100644index 7883fa77..00000000--- a/examples/mixed_models/search_graph_groq_ollama.py+++ /dev/null@@ -1,53 +0,0 @@-"""-Example of Search Graph-"""--import os-from dotenv import load_dotenv-from scrapegraphai.graphs import SearchGraph-from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info-load_dotenv()--# ************************************************-# Define the configuration for the graph-# ************************************************--groq_key = os.getenv("GROQ_APIKEY")--graph_config = {- "llm": {- "model": "groq/gemma-7b-it",- "api_key": groq_key,- "temperature": 0- },- "embeddings": {- "model": "ollama/nomic-embed-text",- "temperature": 0,- "base_url": "http://localhost:11434", # set ollama URL arbitrarily- },- "max_results": 2,- "verbose": True,-}--# ************************************************-# Create the SearchGraph instance and run it-# ************************************************--search_graph = SearchGraph(- prompt="List me all the regions of Italy.",- config=graph_config-)--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/mixed_models/search_graph_groq_openai.py b/examples/mixed_models/search_graph_groq_openai.pydeleted file mode 100644index 3d581063..00000000--- a/examples/mixed_models/search_graph_groq_openai.py+++ /dev/null@@ -1,46 +0,0 @@-"""-Basic example of scraping pipeline using SmartScraper-"""--import os-from dotenv import load_dotenv-from scrapegraphai.graphs import SearchGraph-from scrapegraphai.utils import prettify_exec_info--load_dotenv()---# ************************************************-# Define the configuration for the graph-# ************************************************--groq_key = os.getenv("GROQ_APIKEY")-openai_key = os.getenv("OPENAI_APIKEY")--graph_config = {- "llm": {- "model": "groq/gemma-7b-it",- "api_key": groq_key,- "temperature": 0- },- "embeddings": {- "api_key": openai_key,- "model": "openai",- },- "headless": False-}--search_graph = SearchGraph(- prompt="List me the best escursions near Trento",- config=graph_config-)--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))diff --git a/examples/mixed_models/smart_scraper_groq_ollama.py b/examples/mixed_models/smart_scraper_groq_ollama.pydeleted file mode 100644index f32f3493..00000000--- a/examples/mixed_models/smart_scraper_groq_ollama.py+++ /dev/null@@ -1,52 +0,0 @@-"""-Basic example of scraping pipeline using SmartScraper-"""--import os-from dotenv import load_dotenv-from scrapegraphai.graphs import SmartScraperGraph-from scrapegraphai.utils import prettify_exec_info--load_dotenv()---# ************************************************-# Define the configuration for the graph-# ************************************************--groq_key = os.getenv("GROQ_APIKEY")--graph_config = {- "llm": {- "model": "groq/gemma-7b-it",- "api_key": groq_key,- "temperature": 0- },- "embeddings": {- "model": "ollama/nomic-embed-text",- "temperature": 0,- "base_url": "http://localhost:11434", # set ollama URL arbitrarily- },- "headless": False-}--# ************************************************-# Create the SmartScraperGraph instance and run it-# ************************************************--smart_scraper_graph = SmartScraperGraph(- prompt="List me all the projects with their description.",- # also accepts a string with the already downloaded HTML code- source="https://perinim.github.io/projects/",- config=graph_config-)--result = smart_scraper_graph.run()-print(result)--# ************************************************-# Get graph execution info-# ************************************************--graph_exec_info = smart_scraper_graph.get_execution_info()-print(prettify_exec_info(graph_exec_info))diff --git a/examples/mixed_models/smart_scraper_schema_groq_openai.py b/examples/mixed_models/smart_scraper_schema_groq_openai.pydeleted file mode 100644index f177cb61..00000000--- a/examples/mixed_models/smart_scraper_schema_groq_openai.py+++ /dev/null@@ -1,70 +0,0 @@-"""-Basic example of scraping pipeline using SmartScraper with schema-"""--import json-import os-from typing import Dict, List--from dotenv import load_dotenv-from pydantic import BaseModel--from scrapegraphai.graphs import SmartScraperGraph-from scrapegraphai.utils import prettify_exec_info--load_dotenv()--# ************************************************-# Define the output schema for the graph-# ************************************************--class Project(BaseModel):- title: str- description: str--class Projects(BaseModel):- Projects: Dict[str, Project]--# ************************************************-# Define the configuration for the graph-# ************************************************--groq_key = os.getenv("GROQ_APIKEY")-openai_key = os.getenv("OPENAI_APIKEY")--graph_config = {- "llm": {- "model": "groq/gemma-7b-it",- "api_key": groq_key,- "temperature": 0- },- "embeddings": {- "api_key": openai_key,- "model": "openai",- },- "headless": False-}----# ************************************************-# Create the SmartScraperGraph instance and run it-# ************************************************--smart_scraper_graph = SmartScraperGraph(- prompt="List me all the projects with their description.",- # also accepts a string with the already downloaded HTML code- source="https://perinim.github.io/projects/",- schema=Projects,- config=graph_config-)--result = smart_scraper_graph.run()-print(result)--# ************************************************-# Get graph execution info-# ************************************************--graph_exec_info = smart_scraper_graph.get_execution_info()-print(prettify_exec_info(graph_exec_info))diff --git a/examples/mixed_models/smartscraper_oneapi_ollama.py b/examples/mixed_models/smartscraper_oneapi_ollama.pydeleted file mode 100644index eff5a41d..00000000--- a/examples/mixed_models/smartscraper_oneapi_ollama.py+++ /dev/null@@ -1,40 +0,0 @@-"""-Basic example of scraping pipeline using SmartScraper-"""--from scrapegraphai.graphs import SmartScraperGraph-from scrapegraphai.utils import prettify_exec_info--# ************************************************-# Define the configuration for the graph-# *********************************************--graph_config = {- "llm": {- "api_key": "***************************",- "model": "oneapi/qwen-turbo",- "base_url": "http://127.0.0.1:3000/v1", # 设置 OneAPI URL- },- "embeddings": {- "model": "ollama/nomic-embed-text",- "base_url": "http://127.0.0.1:11434", # 设置 Ollama URL- }-}--# ************************************************-# Create the SmartScraperGraph instance and run it-# ************************************************--smart_scraper_graph = SmartScraperGraph(- prompt="该网站为XXXXX,请提取出标题、发布时间、发布来源以及内容摘要,并以中文回答。",- # 也可以使用已下载的 HTML 代码的字符串- source="http://XXXX",- config=graph_config-)--# ************************************************-# Get graph execution info-# ************************************************-result = smart_scraper_graph.run()-print(result)-print(prettify_exec_info(result))diff --git a/examples/moonshot/smart_scraper_multi_concat_moonshot.py b/examples/moonshot/smart_scraper_multi_concat_moonshot.pynew file mode 100644index 00000000..1e652db4--- /dev/null+++ b/examples/moonshot/smart_scraper_multi_concat_moonshot.py@@ -0,0 +1,52 @@+"""+Basic example of scraping pipeline using SmartScraper+"""+import os+import json+from langchain_community.chat_models.moonshot import MoonshotChat+from dotenv import load_dotenv+from scrapegraphai.graphs import SmartScraperMultiConcatGraph+from scrapegraphai.utils import prettify_exec_info++load_dotenv()++# ************************************************+# Define the configuration for the graph+# ************************************************+++llm_instance_config = {+ "model": "moonshot-v1-8k",+ "base_url": "https://api.moonshot.cn/v1",+ "moonshot_api_key": os.getenv("MOONLIGHT_API_KEY"),+}+++llm_model_instance = MoonshotChat(**llm_instance_config)++graph_config = {+ "llm": {+ "model_instance": llm_model_instance,+ "model_tokens": 10000+ },+ "verbose": True,+ "headless": True,+}+++# *******************************************************+# Create the SmartScraperMultiGraph instance and run it+# *******************************************************++multiple_search_graph = SmartScraperMultiConcatGraph(+ prompt="Who is Marco Perini?",+ source= [+ "https://perinim.github.io/",+ "https://perinim.github.io/cv/"+ ],+ schema=None,+ config=graph_config+)++result = multiple_search_graph.run()+print(json.dumps(result, indent=4))diff --git a/examples/moonshot/smart_scraper_with_moonshot.py b/examples/moonshot/smart_scraper_with_moonshot.pyindex b362414f..28635ba3 100644--- a/examples/moonshot/smart_scraper_with_moonshot.py+++ b/examples/moonshot/smart_scraper_with_moonshot.py@@ -1,12 +1,13 @@"""Basic example of scraping pipeline using SmartScraper and model_instace"""--import os, json-from scrapegraphai.graphs import SmartScraperGraph-from scrapegraphai.utils import prettify_exec_info+import os+import jsonfrom langchain_community.chat_models.moonshot import MoonshotChatfrom dotenv import load_dotenv+from scrapegraphai.graphs import SmartScraperGraph+from scrapegraphai.utils import prettify_exec_info+load_dotenv()# ************************************************diff --git a/examples/nemotron/search_link_graph_nemotron.py b/examples/nemotron/search_link_graph_nemotron.pyindex 6d1edbde..50dce11b 100644--- a/examples/nemotron/search_link_graph_nemotron.py+++ b/examples/nemotron/search_link_graph_nemotron.py@@ -7,6 +7,7 @@ from scrapegraphai.graphs import SearchLinkGraphfrom scrapegraphai.utils import prettify_exec_infoload_dotenv()+# ************************************************# Define the configuration for the graph# ************************************************diff --git a/examples/nemotron/smart_scraper_multi_concat_nemotron.py b/examples/nemotron/smart_scraper_multi_concat_nemotron.pynew file mode 100644index 00000000..0444e18e--- /dev/null+++ b/examples/nemotron/smart_scraper_multi_concat_nemotron.py@@ -0,0 +1,39 @@+"""+Basic example of scraping pipeline using SmartScraper+"""++import os+import json+from dotenv import load_dotenv+from scrapegraphai.graphs import SmartScraperMultiConcatGraph++load_dotenv()++# ************************************************+# Define the configuration for the graph+# ************************************************++graph_config = {+ "llm": {+ "api_key": os.getenv("NEMOTRON_APIKEY"),+ "model": "nvidia/meta/llama3-70b-instruct",+ },+ "verbose": True,+ "headless": False,+}+# *******************************************************+# Create the SmartScraperMultiGraph instance and run it+# *******************************************************++multiple_search_graph = SmartScraperMultiConcatGraph(+ prompt="Who is Marco Perini?",+ source= [+ "https://perinim.github.io/",+ "https://perinim.github.io/cv/"+ ],+ schema=None,+ config=graph_config+)++result = multiple_search_graph.run()+print(json.dumps(result, indent=4))diff --git a/examples/oneapi/smart_scraper_multi_concat_oneapi.py b/examples/oneapi/smart_scraper_multi_concat_oneapi.pynew file mode 100644index 00000000..e1f5490d--- /dev/null+++ b/examples/oneapi/smart_scraper_multi_concat_oneapi.py@@ -0,0 +1,37 @@+"""+Basic example of scraping pipeline using SmartScraper+"""++import os+import json+from scrapegraphai.graphs import SmartScraperMultiConcatGraph+++# ************************************************+# Define the configuration for the graph+# ************************************************++graph_config = {+ "llm": {+ "api_key": "***************************",+ "model": "oneapi/qwen-turbo",+ "base_url": "http://127.0.0.1:3000/v1", # 设置 OneAPI URL+ }+}++# *******************************************************+# Create the SmartScraperMultiGraph instance and run it+# *******************************************************++multiple_search_graph = SmartScraperMultiConcatGraph(+ prompt="Who is Marco Perini?",+ source= [+ "https://perinim.github.io/",+ "https://perinim.github.io/cv/"+ ],+ schema=None,+ config=graph_config+)++result = multiple_search_graph.run()+print(json.dumps(result, indent=4))diff --git a/examples/openai/smart_scraper_multi_concat_openai.py b/examples/openai/smart_scraper_multi_concat_openai.pynew file mode 100644index 00000000..c6ee88cc--- /dev/null+++ b/examples/openai/smart_scraper_multi_concat_openai.py@@ -0,0 +1,41 @@+"""+Basic example of scraping pipeline using SmartScraper+"""++import os+import json+from dotenv import load_dotenv+from scrapegraphai.graphs import SmartScraperMultiConcatGraph++load_dotenv()++# ************************************************+# Define the configuration for the graph+# ************************************************+openai_key = os.getenv("OPENAI_APIKEY")++graph_config = {+ "llm": {+ "api_key": openai_key,+ "model": "openai/gpt-4o",+ },+ "verbose": True,+ "headless": False,+}++# *******************************************************+# Create the SmartScraperMultiGraph instance and run it+# *******************************************************++multiple_search_graph = SmartScraperMultiConcatGraph(+ prompt="Who is Marco Perini?",+ source= [+ "https://perinim.github.io/",+ "https://perinim.github.io/cv/"+ ],+ schema=None,+ config=graph_config+)++result = multiple_search_graph.run()+print(json.dumps(result, indent=4))diff --git a/requirements-dev.lock b/requirements-dev.lockindex 3aab21a2..f68580cc 100644--- a/requirements-dev.lock+++ b/requirements-dev.lock@@ -130,7 +130,6 @@ graphviz==0.20.3# via burrgreenlet==3.0.3# via playwright- # via sqlalchemygrpcio==1.65.4# via google-api-core# via grpcio-statusdiff --git a/requirements.lock b/requirements.lockindex d639583d..e0852c04 100644--- a/requirements.lock+++ b/requirements.lock@@ -83,7 +83,6 @@ googleapis-common-protos==1.63.2# via grpcio-statusgreenlet==3.0.3# via playwright- # via sqlalchemygrpcio==1.65.1# via google-api-core# via grpcio-status