Skip to content

Commit

Permalink
Merge pull request #740 from ScrapeGraphAI/738-smartscrapergraph-smar…
Browse files Browse the repository at this point in the history
…t_scraper_graphrun-fetchnode-object-has-no-attribute-update_state

738 smartscrapergraph smart scraper graphrun fetchnode object has no attribute update state
  • Loading branch information
VinciGit00 authored Oct 10, 2024
2 parents 12f2b99 + e9c8402 commit f56448a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scrapegraphai/nodes/fetch_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def execute(self, state):
return handlers[input_type](state, input_type, source)
elif self.input == "pdf_dir":
return state
elif not source.startswith("http"):
elif not source.startswith("http") and not source.startswith("www"):
return self.handle_local_source(state, source)
else:
return self.handle_web_source(state, source)
Expand Down Expand Up @@ -307,6 +307,7 @@ def handle_web_source(self, state, source):
if not document or not document[0].page_content.strip():
raise ValueError("""No HTML body content found in
the document fetched by ChromiumLoader.""")

parsed_content = document[0].page_content

if (isinstance(self.llm_model, ChatOpenAI) \
Expand Down

0 comments on commit f56448a

Please sign in to comment.