feat: adopt scrapegraph-py 2.0.0 resource-based client#8
Open
VinciGit00 wants to merge 2 commits intomainfrom
Open
feat: adopt scrapegraph-py 2.0.0 resource-based client#8VinciGit00 wants to merge 2 commits intomainfrom
VinciGit00 wants to merge 2 commits intomainfrom
Conversation
Port the LangChain integration to the new ScrapeGraph v2 API, mirroring scrapegraph-py PR #82. Breaking changes: - SmartScraperTool -> ExtractTool (client.extract) - SearchScraperTool -> SearchTool (client.search) - SmartCrawlerTool -> CrawlStartTool/CrawlStatusTool/CrawlStopTool/CrawlResumeTool - Scheduled job tools -> MonitorCreateTool/MonitorListTool/MonitorGetTool/MonitorPauseTool/MonitorResumeTool/MonitorDeleteTool - ScrapeTool now uses url+format params instead of website_url+render_heavy_js - GetCreditsTool now uses client.credits() instead of client.get_credits() - MarkdownifyTool preserved but now uses client.scrape(format="markdown") internally - Removed: AgenticScraperTool (removed in v2) - New: HistoryTool for request history - Version bumped to 2.0.0, scrapegraph-py dependency updated to >=1.31.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tools now construct typed request models (ScrapeRequest, ExtractRequest, SearchRequest, CrawlRequest, MonitorCreateRequest, HistoryFilter) and call the new ScrapeGraphAI client surface (including crawl/monitor/history resources). Results are returned as serialized ApiResult dicts. Minimum Python bumped to 3.12 to match the SDK. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Open
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ScrapeGraphAIclient surface introduced in scrapegraph-py 2.0.0.ScrapeRequest,ExtractRequest,SearchRequest,CrawlRequest,MonitorCreateRequest,HistoryFilter) and hit the newclient.crawl.*,client.monitor.*, andclient.history.*resources.ApiResultenvelope (status/data/error/elapsed_ms).CrawlStartToolusesmax_depth;MonitorCreateToolusesinterval(cron or shorthand) and optionalprompt+output_schemafor JSON extraction;HistoryTooltakesservice/page/limit; minimum Python bumped to 3.12 to match the SDK.Test plan
poetry run pytest tests/unit_tests/(47 passed)api.scrapegraphai.com/api/v2(blocked on a valid v2 API key; client returnsHTTP 403 Invalid API keywith the key provided during review)🤖 Generated with Claude Code