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 foundHello <@&1092713625141137429> ! Apify Creators Day India is happening in Bengaluru this week! 🇮🇳 **Register here:** https://luma.com/apify-zkix We’re going live from the hacker house. Join five Apify Store creators for a panel discussion to learn how they decide what to build, get their first users, and keep their Actors growing. Our guests: **Harsh Maur** (harshmaur) **Sachin Kumar Yadav** (igview-owner) **Pratik Dani** (pratikdani) **Tara Prasad Gurung** (getdataforme) **Anas Nadeem** (whoareyouanas) Got questions? DM me, and we'll make sure to include them in our Q&A ✌️ 💸 questions that are picked for the Q&A will be rewarded with $20 Apify credits, three best questions will receive a special swag package from Apify <:apifylogo:1402604168920698890>
Eva · 2d ago
Hello <@&1092713625141137429> ! Next week we have an amazing webinar planned with <@420988044531859468> : How to choose what to build Apify Store now has over 100k published Actors, so another social media scraper may struggle to find customers. What can you build instead? Register on Luma: https://luma.com/11tlfrzj
Eva · 2w ago
Happy Friday <@&1092713625141137429> 🚨📢 Apify is launching mini-tools on Product Hunt: https://www.producthunt.com/products/apify-tools These are mini-tools built with Apify and Vercel. Some, like Social Brand Monitor, include community Actors! This launch is part of the **Hypership Day**, which means **YOU** can request new tools during the day, and <@420988044531859468> will try to build them within a day. Check it out!
Eva · 2w ago
Join the Discord to ask follow-up questions and connect with the community