is there any way to constantly "listen" to a website and run some code when it updates?
i'm working on earthquake data, specifically, parsing earthquake data from a site that updates and lists earthquake details in real time.
so far, my only (and clunky) solution has been to use task scheduler to run every 30 minutes, which of course would have a time difference of 1-29 minutes depending on when the event will happen between the 30 minute downtime between running the code.
i also thought of using some twitter API, since the site also has an automated twitter account tweeting details every time an earthquake happens, but again this would require constantly "listening" to the twitter stream via python as well.
would appreciate help, thanks.
is there any way to constantly "listen" to a website and run some code when it updates?

If the site offers a feed or stream of updates, use it.
However, if you are looking to scrape a page and trigger code on differences, then you need to poll the site like you are doing (clumsily) with TaskScheduler.
constantly "listen" to website using python