As an example, the Omegle chat site always displays on its homepage the current number of Internet users that I can extract with this python script using the headless HTMLUnit Webdriver in Selenium:
from selenium import webdriver driver = webdriver.Remote(desired_capabilities=webdriver.DesiredCapabilities.HTMLUNITWITHJS) driver.get('http://www.omegle.com/') element = driver.find_element_by_id("onlinecount") print element.text.split()[0]
The output looks like this:
22,183
This number is dynamically generated and updated periodically with a script, and I want to read this dynamically updated content at intervals without reloading the entire page using driver.get . What method or functionality of Selenium Webdriver will allow me to do this?
This article seems relevant, although it has led me to the future.
source share