wet-aquaW
Apify & Crawleeโ€ข4y agoโ€ข
8 replies
wet-aqua

Web Scraper

From the console I can get the text I want

$('span.val').get(0).textContext;


However when I try the following Apify doesn't seem toe like the get

WARN PuppeteerCrawler: Reclaiming failed request back to the list or queue. $(...).get(...).text is not a function

Any pointers to get me past this point are most welcome

async function pageFunction(context) {
// This statement works as a breakpoint when you're trying to debug your code. Works only with Run mode: DEVELOPMENT!
// debugger;

// jQuery is handy for finding DOM elements and extracting data from them.
// To use it, make sure to enable the "Inject jQuery" option.
const $ = context.jQuery;
const pageTitle = $('title').first().text();
const length = $('span.val').get(0).text();
Was this page helpful?