Reputation: 2035
Trying to do some webscraing to return information from this page, and particly this rows in this table. The one issue I see is that each of the row has some sort of a different ID and is slightly different, is there a way to dynamically webscrape these despite the fact that the class is not unique.
Upvotes: 0
Views: 86
Reputation: 2214
Since this is tagged with cheerio
, consider the following solution:
// get html somehow...
var $ = cheerio.load(html)
// query all elements with class "evenrow" or "oddrow"
var $elements = $('.evenrow, .oddrow')
// handle $elements
Upvotes: 1