-
Notifications
You must be signed in to change notification settings - Fork 2
update the smartcrawler to crawl #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ from scrapegraph_py import Client | |
|
|
||
| client = Client(api_key="your-api-key") | ||
|
|
||
| response = client.smartcrawler( | ||
| response = client.crawl( | ||
| url="https://scrapegraphai.com/", | ||
| prompt="Extract info about the company", | ||
| depth=2, | ||
|
|
@@ -294,7 +294,7 @@ class CompanyData(BaseModel): | |
| description: str = Field(description="Description") | ||
| features: list[str] = Field(description="Features") | ||
|
|
||
| response = client.smartcrawler( | ||
| response = client.crawl( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Standardize JavaScript Example Crawl FunctionThe JavaScript schema example still imports and calls |
||
| url="https://example.com", | ||
| prompt="Extract company info", | ||
| schema=CompanyData, | ||
|
|
@@ -330,7 +330,7 @@ from scrapegraph_py import AsyncClient | |
|
|
||
| async def main(): | ||
| async with AsyncClient(api_key="your-api-key") as client: | ||
| task = await client.smartcrawler( | ||
| task = await client.crawl( | ||
| url="https://scrapegraphai.com/", | ||
| prompt="Extract info about the company", | ||
| depth=2, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Fix Inconsistent JavaScript Documentation
The Python examples were updated to use
client.crawl(), but the JavaScript Quick Start still imports and callssmartCrawler(). This creates an inconsistency where line 127 correctly usescrawl()for JavaScript, but lines 40 and 49 still use the oldsmartCrawler()function name, making the documentation inconsistent across examples.