Skip to content

Commit 5a100fb

Browse files
authored
Merge pull request #796 from saied71/main
2 parents 2159677 + 5100fbb commit 5a100fb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scrapegraphai/nodes/fetch_node.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,9 @@ def handle_file(self, state, input_type, source):
170170

171171
compressed_document = self.load_file_content(source, input_type)
172172

173-
return self.update_state(state, compressed_document)
174-
173+
# return self.update_state(state, compressed_document)
174+
state.update({self.output[0]: compressed_document})
175+
return state
175176
def load_file_content(self, source, input_type):
176177
"""
177178
Loads the content of a file based on its input type.
@@ -230,8 +231,9 @@ def handle_local_source(self, state, source):
230231
Document(page_content=parsed_content, metadata={"source": "local_dir"})
231232
]
232233

233-
return self.update_state(state, compressed_document)
234-
234+
# return self.update_state(state, compressed_document)
235+
state.update({self.output[0]: compressed_document})
236+
return state
235237
def handle_web_source(self, state, source):
236238
"""
237239
Handles the web source by fetching HTML content from a URL,

0 commit comments

Comments
 (0)