Hi I am looking to periodically scrape the values from a table such as this one https://www.tennis24.com/match/Wra2Ija2/#match-statistics;0. In an ideal world I'd like to scrape when there's been a change to the page. (I don't know wether this is even possible to do.)
I'm thinking to check every 3 minutes. Is this a good idea? Or is there a simpler approach?
Also, here's my code:
It only pulls player Bs Aces though...
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
Chrom_path = r"C:\Users\Dan1\Desktop\chromedriver.exe"
driver = webdriver.Chrome(Chrom_path)
driver.get("https://www.tennis24.com/match/hOYDXnLI/#match-statistics;0")
print(WebDriverWait(driver,
20).until(EC.visibility_of_element_located((By.XPATH, "//div[@class='statText
statText--titleValue' and
text()='Aces']//following::div"))).get_attribute("innerHTML"))