Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
fix(searchgraph): used shallow copy to serialize obj
Marco Perini096b665c0152
diff --git a/.gitignore b/.gitignoreindex d4cc9d86..f9ce2fae 100644--- a/.gitignore+++ b/.gitignore@@ -31,4 +31,6 @@ examples/graph_examples/ScrapeGraphAI_generated_graphexamples/**/result.csvexamples/**/result.jsonmain.py+*.python-version+*.lock\ No newline at end of filediff --git a/pyproject.toml b/pyproject.tomlindex 53d72326..5383eac9 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -10,7 +10,6 @@ authors = [{ name = "Lorenzo Padoan", email = "[email protected]" }]dependencies = [- # python = ">=3.9, <3.12""langchain==0.1.15","langchain-openai==0.1.6","langchain-google-genai==1.0.3",diff --git a/scrapegraphai/graphs/omni_search_graph.py b/scrapegraphai/graphs/omni_search_graph.pyindex 8dd5aba1..49f75c08 100644--- a/scrapegraphai/graphs/omni_search_graph.py+++ b/scrapegraphai/graphs/omni_search_graph.py@@ -2,7 +2,7 @@OmniSearchGraph Module"""-from copy import deepcopy+from copy import copyfrom .base_graph import BaseGraphfrom ..nodes import (@@ -43,7 +43,7 @@ class OmniSearchGraph(AbstractGraph):def __init__(self, prompt: str, config: dict):self.max_results = config.get("max_results", 3)- self.copy_config = deepcopy(config)+ self.copy_config = copy(config)super().__init__(prompt, config)diff --git a/scrapegraphai/graphs/search_graph.py b/scrapegraphai/graphs/search_graph.pyindex 58b7069c..6a46ab91 100644--- a/scrapegraphai/graphs/search_graph.py+++ b/scrapegraphai/graphs/search_graph.py@@ -2,7 +2,7 @@SearchGraph Module"""-from copy import deepcopy+from copy import copyfrom .base_graph import BaseGraphfrom ..nodes import (@@ -42,7 +42,7 @@ class SearchGraph(AbstractGraph):def __init__(self, prompt: str, config: dict):self.max_results = config.get("max_results", 3)- self.copy_config = deepcopy(config)+ self.copy_config = copy(config)super().__init__(prompt, config)