
Puppeteer Scraper
Pricing
Pay per usage

Puppeteer Scraper
Crawls websites with the headless Chrome and Puppeteer library using a provided server-side Node.js code. This crawler is an alternative to apify/web-scraper that gives you finer control over the process. Supports both recursive crawling and list of URLs. Supports login to website.
5.0 (5)
Pricing
Pay per usage
140
Total users
6.8k
Monthly users
859
Runs succeeded
>99%
Issue response
44 days
Last modified
23 days ago
Inject Jquery issue
Closed
Hi,
It seems not possible to inject jquery as specified in the documentation.
What is the proper way do do that ?
async function pageFunction(context) {const { page, request, Apify } = context;await Apify.utils.puppeteer.injectJQuery(page);// "Apify.utils" is undefinedreturn {url: request.url,};}
Thanks

The method is now directly available in the crawling context and you no longer need to provide the page
option as it gets used automatically:
https://crawlee.dev/api/puppeteer-crawler/interface/PuppeteerCrawlingContext#injectJQuery
async function pageFunction(context) {const { request, injectJQuery } = context;await injectJQuery();return {url: request.url,};}

Where did you find the example? Current docs are correct, they only contain the contextual helper, so closing as answered. Be sure to read the latest version of the docs, sounds like you are viewing the old one for v2.
lou_stable
FYI the academy docs still have the old v2 example, i ran into this issue today: https://docs.apify.com/academy/apify-scrapers/puppeteer-scraper