Update smart_scraper_graph.py

This commit is contained in:
supercoder-dev 2024-06-12 14:28:33 +05:30 committed by GitHub
parent 81f89d88be
commit 828bdeedce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,8 +65,10 @@ class SmartScraperGraph(AbstractGraph):
output=["doc", "link_urls", "img_urls"],
node_config={
"loader_kwargs": self.config.get("loader_kwargs", {}),
"headless": self.config.get("headless", True) # Ensure headless flag is passed
}
)
logging.info("FetchNode configured with headless: %s", self.config.get("headless", True))
parse_node = ParseNode(
input="doc",
output=["parsed_doc"],
@ -117,4 +119,4 @@ class SmartScraperGraph(AbstractGraph):
inputs = {"user_prompt": self.prompt, self.input_key: self.source}
self.final_state, self.execution_info = self.graph.execute(inputs)
return self.final_state.get("answer", "No answer found.")
return self.final_state.get("answer", "No answer found.")