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

189
Views
¿Cómo lanzar una excepción si el proxy está temporalmente inactivo y volver a cargar el navegador en node.js?
 async function run() { const browser = await puppeteer.launch({ args: ['--proxy-server=185.209.177.12:8080'], headless: false, });

Quiero que node.js vuelva a cargar el navegador y vuelva a intentarlo si el proxy no funciona. El script deja de ejecutarse cuando el proxy está inactivo. Quiero que continúe ejecutándose**.

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

0

¿Podrías hacer algo como esto?

 async function run() { while (true) { try { browser = await puppeteer.launch({ headless: true, args: ["--proxy-server=185.209.177.12:8080"], }); break; } catch (e) { console.log("Proxy temporarily unavailable, retrying..."); await sleep(5000); } } }
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!