I am looking to scrape data from this site\'s mma data and parsing a few highcharts tables. I am clicking a link with selenium and then switching to the chart. I go to this s
When I use the CSS selector "g.highcharts-axis-labels tspan"
it returns all the fighter's names and when I use "g.highcharts-data-labels tspan"
it returns all the percents for line movement.
So you should be able to use something like
labels = driver.find_elements_by_css_selector("g.highcharts-axis-labels tspan")
data = driver.find_elements_by_css_selector("g.highcharts-data-labels tspan")
for i in range(0, len(labels) - 1)
print("Fighter: " + labels[i] + " (" + data[i] + ")")
An alternative is to use the command that Pawel Fus recommended,
Highcharts.charts[0].series[0].options.data
You should be able to execute that using JSE and it returns an array of arrays. You can then parse through that and get the data you want. It's up to you...