![Example Code Runner (Playwright) avatar](https://images.apifyusercontent.com/wFaHqqd2hqUV5fTqr-jA9CbINKhXw9VvH3N6UIQ1xMQ/rs:fill:92:92/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS82aTVRc0hCTXRtM2hLcGg3MC9xZXM4WlB4OXF2dFhNNlJoWi1hcGlmeV9sb2dvLnBuZw.webp)
No credit card required
![Example Code Runner (Playwright)](https://images.apifyusercontent.com/wFaHqqd2hqUV5fTqr-jA9CbINKhXw9VvH3N6UIQ1xMQ/rs:fill:92:92/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS82aTVRc0hCTXRtM2hLcGg3MC9xZXM4WlB4OXF2dFhNNlJoWi1hcGlmeV9sb2dvLnBuZw.webp)
Example Code Runner (Playwright)
No credit card required
Generic Actor to run code examples from the documentation via "Run on Apify" links.
Need help for a part of the code in crawlee documentation.
Closed
Hi,
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...
![paja avatar](https://apify-image-uploads-prod.s3.us-east-1.amazonaws.com/hCCYrBtwh5YxGuJm9/KsQTPQkJxxdkgvMEw-Liberec2017_061m.jpg)
Hi, thanks for reaching out, we´ll look into it and let you know what can be done.
![janbuchar avatar](https://apify-image-uploads-prod.s3.us-east-1.amazonaws.com/4yfxkhP2QSajkpybN/Z6gszzr1SgoYXNz8H-DSCF1317_crop.jpg)
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.
- 48 monthly users
- 8 stars
- 93.7% runs succeeded
- 8.6 days response time
- Created in Sep 2023
- Modified about 1 month ago