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

217
Views
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
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!