page.locatorpage.locator functions to find elements and scrap text from them. Most of the elements are always on the page, but few elements like reviews are not always there since the product may be new and doesn't have any review yet. That would be no problem at all if not the playwright / crawlee failing because of it. What I saw is that when page.locatorpage.locator can't find an given element it throws an error - that's okay. But crawlee is picking this error as like "the whole page error" and marks request to the page as failed. Even though other locators are working and there's a lot of data that has been found with other page.locatorpage.locator I'm getting messages that request to url someshop/product-55 failed. How can I somehow fix this and tell crawlee / playwright to not fail if the page.locatorpage.locator fails? I'm okay with having empty string if there's no reviews found, but I'm not okay with igoring other data because of one page.locatorpage.locator failure. Example code:const a = await page
.locator(a_locator)
.textContent(); // element found
const reviews = await page
.locator(reviews_locator)
.textContent(); // element not found, error thrown
const b = await page
.locator(b_locator)
.textContent(); // element found
const c = await page
.locator(c_locator)
.textContent(); // element foundconst a = await page
.locator(a_locator)
.textContent(); // element found
const reviews = await page
.locator(reviews_locator)
.textContent(); // element not found, error thrown
const b = await page
.locator(b_locator)
.textContent(); // element found
const c = await page
.locator(c_locator)
.textContent(); // element foundJoin the Discord to ask follow-up questions and connect with the community
๐ฃ **New Apify CLI 1.7.0 is here - built for AI agents!** @here Hey folks! ๐ We just published a blog post on the new Apify CLI release: https://blog.apify.com/apify-cli-1-7-0/ Highlights: โข **Honest exit codes** - builds/runs only report success (exit 0) when the job *actually* succeeded, no more false "done" signals โข **`apify actors info <actor-id> --input`** - agents can check an Actor's input schema before guessing JSON โข **`apify mcp install <client>`** - one-command MCP setup for Claude Code, Cursor, VS Code, Codex CLI, Kiro, and Antigravity โข **OS keychain storage** - your API token and proxy password now live in your OS's secret store instead of a plaintext file If you're running AI agents against Apify, this one's worth a read. Let us know what you think! ๐
Saurav Jain ยท 3d ago
**Public testing of generated API clients** At Apify, we manually maintain the Python and JavaScript API clients. We do not have the resources to manually support API clients in other languages, so we are testing generated, AI-maintained API clients. The clients are experimental but open to wide public testing. You are welcome to use them, and we will be thankful if you report any issues you find in the respective repository's issue tracker. **Generated clients and their source code:** **Rust:** <:rustcrab:988385043716112415> https://crates.io/crates/apify-client https://github.com/apify/apify-client-rust **Java:** <:java:1524018763916116029> https://central.sonatype.com/artifact/com.apify/apify-client https://github.com/apify/apify-client-java **.NET:** <:csharp:1011963620483154060> https://www.nuget.org/packages/Apify.Client https://github.com/apify/apify-client-dotnet **PHP:** <:php:994571917828837456> https://packagist.org/packages/apify/apify-client https://github.com/apify/apify-client-php **Go:** <:golang:988385029044449300> https://github.com/apify/apify-client-go/releases/tag/v0.4.1 https://github.com/apify/apify-client-go
Josef ยท 3d ago
**In partnership with Coinbase, Apify is now the first community-driven marketplace on x402: ** AI agents can discover, pay for, and run more than 20,000 Apify Actors on their own - no account, no subscription, no API key, no human in the loop. Just a funded wallet and an HTTP request. **Try it / learn more** - Launch blog post: https://blog.apify.com/introducing-x402-agentic-payments/ - Docs for humans: https://docs.apify.com/platform/integrations/x402 - Skill for agents: apify.it/x402-awal **Help us amplify the launch** - Announcement post on Reddit: https://www.reddit.com/r/apify/comments/1ujszzs/apify_is_live_on_x402/ - Announcement post on X/Twitter: https://x.com/apify/status/2071963996576743795 - Announcement post on LinkedIn: https://www.linkedin.com/posts/apify_until-today-agents-could-buy-about-2000-activity-7477730617913356291-eP3d Discover Apify endpoints on agentic.market: https://agentic.market/services/agi-apify-com
ellativity ยท 2w ago