Skip to content

Python scraper based on AI

fix(asyncio): replaced deepcopy with copy due to serialization problems

Marco Perinidedc73304755
diff --git a/examples/openai/search_graph_openai.py b/examples/openai/search_graph_openai.py
index ffff1cb5..7f40ebde 100644
--- a/examples/openai/search_graph_openai.py
+++ b/examples/openai/search_graph_openai.py
@@ -28,7 +28,7 @@ graph_config = {
# ************************************************
search_graph = SearchGraph(
- prompt="List me the best escursions near Trento",
+ prompt="List me Chioggia's famous dishes",
config=graph_config
)
diff --git a/scrapegraphai/nodes/graph_iterator_node.py b/scrapegraphai/nodes/graph_iterator_node.py
index 4ed7ad8e..517dfe0c 100644
--- a/scrapegraphai/nodes/graph_iterator_node.py
+++ b/scrapegraphai/nodes/graph_iterator_node.py
@@ -11,7 +11,7 @@ from tqdm.asyncio import tqdm
from .base_node import BaseNode
-_default_batchsize = 4
+_default_batchsize = 2
class GraphIteratorNode(BaseNode):
@@ -118,7 +118,7 @@ class GraphIteratorNode(BaseNode):
# creates a deepcopy of the graph instance for each endpoint
for url in urls:
- instance = copy.deepcopy(graph_instance)
+ instance = copy.copy(graph_instance)
instance.source = url
participants.append(instance)