My goal is to access a list of links (located in "event?id=85042"
).
<tr class="gvrow"> == $0
<td>...</td>
<td>
<a href="event?id=85042"
text
</a>
</td>
...
This repeats too, so I want to get a list of the links located in event?id=... I've tried this approach from this question Python Selenium - get href value but it is returning a list full of None
primary_links = driver.find_elements_by_class_name('gvrow')
links = [elem.get_attribute('href') for elem in primary_links]
print(links)
Output:
[None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None]
Desired Output:
['https://www.iccf.com/event?id=85042', 'https://www.iccf.com/event?id=79897', 'https://www.iccf.com/event?id=66745', ...]
How would I do it then?