Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

334
Views
TypeError [ERR_INVALID_CALLBACK]: la devolución de llamada debe ser una función. Promesa recibida { <pendiente> }

Recibo este error mientras intento raspar prnt.sc y no entiendo por qué.

Creo que setInterval() me está dando problemas.

TypeError [ERR_INVALID_CALLBACK]: la devolución de llamada debe ser una función. Promesa recibida { }

 const puppeteer = require("puppeteer"); const select = require('puppeteer-select'); async function llamar() { const browser = await puppeteer.launch({ headless: true }); var text = ""; var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; for (var i = 0; i < 6; i++) text += "https://prnt.sc/" + possible.charAt(Math.floor(Math.random() * possible.length)); console.log(text) const page = await browser.newPage(); path = Math.random() await page.goto(text) const element = await select(page).getElement('button:contains(AGREE)'); await element.click() await page.screenshot({ path: path + '.jpg' }) await browser.close(); } setInterval(llamar(), 2000);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

De hecho, en setInterval , se supone que debe dar una función, no ejecutar una.

llamar() está ejecutando la función.

Prueba esto:

 setInterval(llamar, 2000);
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!