mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-12 21:01:56 +08:00
Update smart_scraper_graph.py
This commit is contained in:
parent
81f89d88be
commit
828bdeedce
@ -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.")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user