ScrapeGraphAI / Scrapegraph-ai

Python scraper based on AI
https://scrapegraphai.com
MIT License
16k stars 1.3k forks source link

SmartScraperGraph: smart_scraper_graph.run() 'FetchNode' object has no attribute 'update_state' #738

Closed mpilioun closed 1 month ago

mpilioun commented 1 month ago

Describe the bug I have created a poetry shell env so all dependencies were installed there. Below is my code:

import os import json from dotenv import load_dotenv from scrapegraphai.graphs import SmartScraperGraph

LOAD VARIABLES

load_dotenv() OPENAI_API_KEY=os.environ["OPENAI_API_KEY"]

Define the configuration for the scraping pipeline

graph_config = { "llm": { "api_key": OPENAI_API_KEY, "model": "openai/gpt-4o-mini", }, "verbose": True, "headless": False, }

website="www.adrinabeach.com"

smart_scraper_graph = SmartScraperGraph( prompt="Find me a contact email from this website", source=website, config=graph_config ) result = smart_scraper_graph.run() print(json.dumps(result, indent=4))

Output: --- Executing Fetch Node --- --- (Fetching HTML from: www.adrinabeach.com) --- AttributeError: 'FetchNode' object has no attribute 'update_state'

VinciGit00 commented 1 month ago

hi use https://adrinabeach.com instead

VinciGit00 commented 1 month ago

btw i Will update the fetch node, thank u

VinciGit00 commented 1 month ago

please update to the new version