From 3ea1f20c8309a7d51cc0e4b458f78bf57377e269 Mon Sep 17 00:00:00 2001 From: Marco Vinciguerra <88108002+VinciGit00@users.noreply.github.com> Date: Fri, 20 Sep 2024 21:48:24 +0200 Subject: [PATCH] Update fetch_node.py --- scrapegraphai/nodes/fetch_node.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/scrapegraphai/nodes/fetch_node.py b/scrapegraphai/nodes/fetch_node.py index 19d59004..d07735e3 100644 --- a/scrapegraphai/nodes/fetch_node.py +++ b/scrapegraphai/nodes/fetch_node.py @@ -316,21 +316,7 @@ class FetchNode(BaseNode): compressed_document = [ Document(page_content=parsed_content, metadata={"source": "html file"}) ] - - return self.update_state(state, compressed_document) - - def update_state(self, state, compressed_document): - """ - Updates the state with the output data from the node. - - Args: - state (dict): The current state of the graph. - compressed_document (List[Document]): The compressed document content fetched - by the node. - - Returns: - dict: The updated state with the output data. - """ - + state["original_html"] = document state.update({self.output[0]: compressed_document,}) return state +