Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

136
Vistas
get the random generated string in javascript function from website

I want to do website scraping however the there is a random generated string added to the reactEventHandlers, Please look below code, there is a reactEverHandle$ followed by a string which is randomly generated. I found the function (second code)which generates it and wondering how can I get the same generated string once I run my js.file?

document.getElementsByClassName("ProductReviewCustomerInfo-name")[0].__reactEventHandlers$nt3qerm8wcb

 var Tn = Math.random().toString(36).slice(2)
      , xn = "__reactInternalInstance$" + Tn
      , Pn = "__reactEventHandlers$" + Tn
      , _n = "__reactContainere$" + Tn;

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This might work for you.

I'm extracting all keys and then running a simple regex check to match your random generated key.

let keys = document.getElementsByClassName("ProductReviewCustomerInfo-name")[0].keys();
const regex = /^(__reactEventHandlers\$\w+)$/gm;
let your_key = keys.find(x => regex.test(x));
console.log(your_key);
let value = document.getElementsByClassName("ProductReviewCustomerInfo-name")[0][key];
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda