mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
Use environment variable to initialize scrapegraph_py.Client (#362)
This commit fixes a bug where `SCRAPEGRAPH_API_KEY` were never used to initialize `scrapegraph_py.Client`.
This commit is contained in:
@@ -102,9 +102,8 @@ class ScrapegraphScrapeTool(BaseTool):
|
||||
"`scrapegraph-py` package not found, please run `uv add scrapegraph-py`"
|
||||
)
|
||||
|
||||
self._client = Client(api_key=api_key)
|
||||
|
||||
self.api_key = api_key or os.getenv("SCRAPEGRAPH_API_KEY")
|
||||
self._client = Client(api_key=self.api_key)
|
||||
|
||||
if not self.api_key:
|
||||
raise ValueError("Scrapegraph API key is required")
|
||||
|
||||
Reference in New Issue
Block a user