I am trying to scrape all "Box Score" links on http://www.basketball-reference.com/teams/GSW/2016_games.html. It would be perfect if someone showed me a way to click on them one by one, but just scrape them would already be amazing. Using 'a'-selector I managed to scrape all links from page:
$('tbody tr a').each(function (i) {
console.log([i + 1, $(this).text(), ' // ' + $(this).attr('href')].join(': '));
});
But I don't see a way how to specify Box-score links
This selector will do what you want:
#teams_games > tbody > tr > td:nth-child(5) > a
A helpeful tip-- if you use developer tools in Chrome, you can right click an inspected element and choose Copy >> Copy Selector to get a css selector for it. That is usually a good starting point for making a more generalizable selector for cases like this.