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

162
Views
Iniciar sesión> Ir a una página específica> Buscar> Tomar contenido específico de la página usando Node JS y Titiritero

Quiero extraer algunos datos de la página protegida de inicio de sesión usando Node Js y Puppeteer. Cuando trato de extraer datos, no se puede acceder a la página de programas. No tengo idea de por qué obtengo un resultado como este. Aquí está mi código.

Soy nuevo en Puppeteer y Node Js, han pasado 8 horas. Estoy tratando de modificar ese código, pero no funciona.

 async function EmailLookup(MlsNumber) { resp = new { Success = false }; (page = await singletonBrowser.Instance.newPage()) { await page.setRequestInterception(true); page.Request += (sender, e) => { if (e.Request.resourceType === resourceType.document || e.Request.resourceType === resourceType.Script || e.Request.resourceType === resourceType.Xhr) e.Request.Continue(); else e.Request.Abort(); }; await page.async("https://example.com/idp/login"); if (!page.Url.Contains("layouts")) { await page.waitForSelector("#username"); await page.waitForSelector("#password"); await page.waitForSelector("#loginbtn"); await page.async("#username", "xxxxx"); await page.async("#password", "xxxxx"); await page.async("#password", "\r"); await page.waitForNavigation(new navigationOptions { Timeout = 0 }); } await page.goto("https://example.com/launch?layoutid=61&appid=433"); await page.waitForSelector("#ctl02_m_ucSpeedBar_m_tbSpeedBar"); await page.async("#ctl02_m_ucSpeedBar_m_tbSpeedBar", MlsNumber); await page.async("#ctl02_m_ucSpeedBar_m_tbSpeedBar", "\r"); await page.waitForNavigation(new navigationOptions { Timeout = 0 }); var MLSLink = await page.waitForXPath("//a[text()='" + MlsNumber + "']"); if (MLSLink != null) { await MLSLink.click(); await page.waitForNavigation(new navigationOptions{ Timeout = 0 }); var Content = await page.get(); htmldoc = new htmldoc(); htmldoc.load(Content); var parcelNode = htmldoc.document.selectSingleNode("//a[contains(@href,'AssessorParcelDetail')]"); var emailNode = htmldoc.document.selectSingleNode("//a[contains(@href,'mailto:')]"); if (emailNode != null && parcelNode != null) { resp.Success = true; resp.Email = emailNode.innerText; resp.Parcel = parcelNode.innerText; } } return json(resp); } }
about 4 years ago · Juan Pablo Isaza
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!