If you visit this site, https://www.premierleague.com/players, you will be able to see a list of players with their positions and Nationality. I am only required to scrape the position but I am unable to
playerss = driver.find_elements(By.XPATH, '//*[@id="mainContent"]/div[2]/div[1]/div/div/table/tbody/tr')
for player in playerss:
position = player.find_element(By.XPATH,'//[@id="mainContent"]/div[2]/div[1]/div/div/table/tbody/tr/td[2]')
print(position)
This is what I have but it is not working. If anyone knows how to help, I will appreciate it.
Thanks!