File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ dependencies = [
4444 " googlesearch-python>=1.2.5" ,
4545 " simpleeval>=1.0.0" ,
4646 " async_timeout>=4.0.3" ,
47- " scrapegraph-py>=0.0.3 "
47+ " scrapegraph-py>=0.0.4 "
4848]
4949
5050license = " MIT"
Original file line number Diff line number Diff line change 1313 ConditionalNode
1414)
1515from ..prompts import REGEN_ADDITIONAL_INFO
16- from scrapegraph_py import ScrapeGraphClient , smart_scraper
16+ from scrapegraph_py import SyncClient
1717
1818class SmartScraperGraph (AbstractGraph ):
1919 """
@@ -61,10 +61,14 @@ def _create_graph(self) -> BaseGraph:
6161 BaseGraph: A graph instance representing the web scraping workflow.
6262 """
6363 if self .llm_model == "scrapegraphai/smart-scraper" :
64- client = ScrapeGraphClient (self .config .get ("api_key" ))
6564
66- result = smart_scraper (client , self .source , self .prompt )
67- return result
65+ sgai_client = SyncClient (api_key = self .config .get ("api_key" ))
66+
67+ response = sgai_client .smartscraper (
68+ website_url = self .source ,
69+ user_prompt = self .prompt
70+ )
71+ return response
6872
6973 fetch_node = FetchNode (
7074 input = "url| local_dir" ,
You can’t perform that action at this time.
0 commit comments