Is there any way to scrape beyond the first page of this:
https://www.sportstats.ca/display-results.xhtml?raceid=23666
I've tried Selenium in the past and have had varying degrees of success. I find it very heavy, sometimes it doesn't work, sometimes it hangs. If at all possible I would prefer to avoid it and just use urllib.request and do something with headers/cookies to find the data I'm looking for.
These are the roadblocks:
1) The URL doesn't change when you go to another page.
2) The link to go to the next page (for example) is JS or something, and is not easy to handle:
<li><a id="mainForm:j_idt341" href="#" class="ui-commandlink ui-widget fa fa-angle-right" onclick="PrimeFaces.ab({s:"mainForm:j_idt341",p:"mainForm",u:"mainForm:result_table mainForm:pageNav mainForm:eventAthleteDetailsDialog",onco:function(xhr,status,args){hideDetails('athlete-popup');showDetails('event-popup');scrollToTopOfElement('mainForm\\:result_table');;}});return false;"></a>
Can anyone point me in the right direction to walk through this and scrape each page.