Im extracting some soccer data from a simple dynamic table using Selenium, but the problem is, when im trying to get the "text-center" class name, it shows a lot of extra data that i dont want.
I've tried using xpath and css_selector, but it wont solve the problem.
Site HTML:
Data 1: Score (Wanted result: 0-0)
<td class="text-center">
<a href="/r/1571269/somedata" id="r_1571269S">0-0</a>
</td>
Data 2: Odd: (Wanted data: 2.375)
<td class="text-center" id="o_1562530_0">2.375</td>
This is part of my code:
Score = driver.find_element_by_class_name('text-center')
for score in Score:
print("Score: "+ score.text)
As you can see, they have the same class name, and when i run the script, it appears both togheter plus a lot of extra content with that class name. Also i've tried by finding by id, but the id changes every time so it has no sense. What do you recommend? THanks in advance.
<td>elements?