File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ dependencies = [
44
44
" googlesearch-python>=1.2.5" ,
45
45
" simpleeval>=1.0.0" ,
46
46
" async_timeout>=4.0.3" ,
47
- " scrapegraph-py>=0.0.3 "
47
+ " scrapegraph-py>=0.0.4 "
48
48
]
49
49
50
50
license = " MIT"
Original file line number Diff line number Diff line change 13
13
ConditionalNode
14
14
)
15
15
from ..prompts import REGEN_ADDITIONAL_INFO
16
- from scrapegraph_py import ScrapeGraphClient , smart_scraper
16
+ from scrapegraph_py import SyncClient
17
17
18
18
class SmartScraperGraph (AbstractGraph ):
19
19
"""
@@ -61,10 +61,14 @@ def _create_graph(self) -> BaseGraph:
61
61
BaseGraph: A graph instance representing the web scraping workflow.
62
62
"""
63
63
if self .llm_model == "scrapegraphai/smart-scraper" :
64
- client = ScrapeGraphClient (self .config .get ("api_key" ))
65
64
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
68
72
69
73
fetch_node = FetchNode (
70
74
input = "url| local_dir" ,
You can’t perform that action at this time.
0 commit comments