Skip to content

Python scraper based on AI

Update base_graph.py

Marco Vinciguerra6e4d04450fce
diff --git a/scrapegraphai/graphs/base_graph.py b/scrapegraphai/graphs/base_graph.py
index 052d501c..c441f7ab 100644
--- a/scrapegraphai/graphs/base_graph.py
+++ b/scrapegraphai/graphs/base_graph.py
@@ -157,9 +157,9 @@ class BaseGraph:
embedder_model = embedder_model.model
if hasattr(current_node, "node_config"):
- if type(current_node.node_config) is dict:
+ if isinstance(current_node.node_config,dict):
if current_node.node_config.get("schema", None) and schema is None:
- if type(current_node.node_config["schema"]) is not dict:
+ if not isinstance(current_node.node_config["schema"], dict):
# convert to dict
try:
schema = current_node.node_config["schema"].schema()