Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions scrapegraphai/nodes/fetch_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,9 @@ def handle_file(self, state, input_type, source):

compressed_document = self.load_file_content(source, input_type)

return self.update_state(state, compressed_document)

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

return self.update_state(state, compressed_document)

# return self.update_state(state, compressed_document)
state.update({self.output[0]: compressed_document})
return state
def handle_web_source(self, state, source):
"""
Handles the web source by fetching HTML content from a URL,
Expand Down
Loading