Example Code Runner (Playwright)
No credit card required
Example Code Runner (Playwright)
No credit card required
Generic Actor to run code examples from the documentation via "Run on Apify" links.
Do you want to learn more about this Actor?
Get a demoHi,
Since yesterday, I'm learning apify's features.
Now : https://crawlee.dev/docs/introduction/scraping Part: Trying it out (Near 65% in the page...)
All the code works well, except: const priceElement = page .locator('span.price') .filter({ hasText: '$', }) .first();
Works well in apify console, but not locally... (Without this part, even locally all this script run well)
Is my package the same as apify console ? { "name": "my-actor", "version": "0.0.1", "type": "module", "description": "This is an example of learning Apify actor.", "dependencies": { "apify": "^3.2.0", "crawlee": "^3.9.2", "playwright": "^1.43.1", "puppeteer": "*" }, "devDependencies": { "@apify/eslint-config": "^0.4.0", "eslint": "^9.1.1" }, "scripts": { "start": "node src/main.js", "test": "echo "Error: oops, the actor has no tests yet, sad!" && exit 1" }, "author": "GC7", "license": "ISC" }
Thanks for your help.
Lionel.
Note that this code:
const price = (await page.locator('span.price').first().textContent()).split('$')[1];
works, waiting your answer...
Hi, thanks for reaching out, we´ll look into it and let you know what can be done.
Hello, if you require help with running code samples locally, please reach out via Github discussions (https://github.com/apify/crawlee/discussions/) or join our Discord community (https://discord.com/invite/jyEM2PRvMU).
This issue tracker is for the actor responsible for running code examples only, which is why I'm closing this issue now.
Actor Metrics
37 monthly users
-
10 stars
>99% runs succeeded
Created in Sep 2023
Modified 6 months ago