Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

220
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda