Puppeteer Scraper avatar
Puppeteer Scraper
Try for free

No credit card required

View all Actors
Puppeteer Scraper

Puppeteer Scraper

Try for free

No credit card required

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.

User avatar

Inject Jquery issue


assured_kumquat opened this issue
a year ago


It seems not possible to inject jquery as specified in the documentation.

What is the proper way do do that ?

1async function pageFunction(context) {
2    const { page, request, Apify } = context;
4    await Apify.utils.puppeteer.injectJQuery(page);
6//  "Apify.utils" is undefined
8    return {
9        url: request.url,
10    };


User avatar

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:


1async function pageFunction(context) {
2    const { request, injectJQuery } = context;
3    await injectJQuery();
5    return {
6        url: request.url,
7    };
User avatar

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.

Maintained by Apify
Actor metrics
  • 285 monthly users
  • 99.8% runs succeeded
  • 15 days response time
  • Created in Apr 2019
  • Modified about 1 month ago