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

169
Views
page.evaluate() - el documento no está definido

Traté de obtener el documento de un sitio web con Puppetter pero de alguna manera page.evaluate no funciona como pensaba.

 let browser = await puppeteer.launch({headless:true}); let page = await browser.newPage(); await page.setViewport({ width: 1920, height: 1080 }) await page.goto('https://www.tradingview.com/chart/'); const doc = await page.evaluate(() => { return document; }); console.log(doc)

Cuando imprimo un documento, se imprime sin definir

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Desafortunadamente, page.evaluate() solo puede transferir valores serializables (más o menos, los valores que JSON puede manejar). Como el document devuelve un elemento DOM que no es serializable (contiene métodos y referencias circulares), se reemplaza con undefined . Debe devolver un valor serializable (por ejemplo, document.body.innerText ) o usar algo como page.evaluateHandle() y JSHandle API.

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!