If you visit this site, https://www.premierleague.com/match/66686 and then press stats tab, you will see several information about the match. How am I supposed to scrape the Possession for both teams?
This did not work.
stats = driver.find_element(By.XPATH, '//*[@id="mainContent"]/div/section[2]/div[2]/div[2]/div[1]/div/div/ul/li[3]')
stats.click()
posHome = driver.find_element(By.XPATH,'//body[1]/main[1]/div[1]/section[2]/div[2]/div[2]/div[2]/section[3]/div[2]/div[2]/table[1]/tbody[1]/tr[1]/td[1]')
print(posHome.text)
posAway = driver.find_element(By.XPATH,'//*[@id="mainContent"]/div/section[2]/div[2]/div[2]/div[2]/section[3]/div[2]/div[2]/table/tbody/tr[1]/td[3]')
print(posAway.text)
Please let me know how to solve this issue and thanks!