Skip to content

Commit 39a029e

Browse files
committed
feat: refactoring fetch_node
1 parent 12f2b99 commit 39a029e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scrapegraphai/nodes/fetch_node.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def execute(self, state):
124124
return handlers[input_type](state, input_type, source)
125125
elif self.input == "pdf_dir":
126126
return state
127-
elif not source.startswith("http"):
127+
elif not source.startswith("http") or not source.startswith("www"):
128128
return self.handle_local_source(state, source)
129129
else:
130130
return self.handle_web_source(state, source)
@@ -307,6 +307,7 @@ def handle_web_source(self, state, source):
307307
if not document or not document[0].page_content.strip():
308308
raise ValueError("""No HTML body content found in
309309
the document fetched by ChromiumLoader.""")
310+
310311
parsed_content = document[0].page_content
311312

312313
if (isinstance(self.llm_model, ChatOpenAI) \

0 commit comments

Comments
 (0)