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

221
Vistas
Scrape website and return value every time text on webpage updates

I'm trying to write a program that monitors a website that has text that changes very quickly, at least once per second. I want to have a variable that updates every time the text on the webpage updates. There are multiple pieces of text on the website that update quickly, I will likely expand my code to keep track of all of it, but right now I am focussing on just tracking one.

I have currently tried using javascript, but if there exists a way to do this in a different language, such as python, I will switch over to that. In javascript, I have tried using the Selenium library to inject code into the website and using a MutationObserver which updates a variable every time the text I am monitoring changes. The problem I am having is that my program does not have access to this variable as it exists within the scope of the website. I have also tried using the Nightmare library but run into the same problem. I can return the variable, but I will only receive whatever the state of the variable was at that moment in time, it will not update.

Is there anyway to inject code into the website that can run a callback function that gives the value to my program? Or have the injected code return an object which will constantly get updated when the site's text updates? Or if there is an entirely different way I should go about doing this, please let me know. Thank you.

about 4 years ago · Juan Pablo Isaza
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