seleniumxpathweb-scrapingwebdriverwaitexpected-condition

How to scrape the data from the cricinfo website for commentary of the first innings of every match modifying a filter using Selenium and Python


Hey guys I have been trying to scrape some data from the cricinfo website for commentary of every match. I am able to get the full data for the second innings.. but unable to do so for the first innings as the drop-down present does not seem to have options or anything such as select class when I inspect source code.. it would be great if someone could suggest some options to do this. This is the URL of the page https://www.espncricinfo.com/series/8048/commentary/1181768/mumbai-indians-vs-chennai-super-kings-final-indian-premier-league-2019[enter image description here]1


Solution

  • To scrape the data from the cricinfo website for commentary of the first innings of every match match modifying the filter using Selenium you need to induce WebDriverWait for the visibility_of_element_located() and you can use the following Locator Strategies: