Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98749

How do you scrape even numbered elements with python/selenium?

$
0
0

Code that I am targeting looks like this:

<td>
     <b>Shipwreck</b>: Fairfax the Deckhand
     <br>
     <b>Harpoon Harry's</b>: Franchisco Corvallio<br>
</td>

The issue is there are 50 elements on the page, out of every 5 TD elements, I only need the second one. So for example element 2, 7, 12, 17, etc. All of the elements do not have any class elements or id's so the only way that I am able to target them is through order but I am not sure how to do that through selenium.


Viewing all articles
Browse latest Browse all 98749

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>