There are two styles of td tags in the analyzed document (among other td tags):
<td align="right" nowrap bgcolor="#A1C87A">...</td> <td align="right" nowrap>...</td>
How to write a selector that selects only the second type and exclude all td tags?
document.css('td:not([bgcolor="#A1C87A"])')
excludes the first type, includes the second type plus all other td tags.
document.css('td[align="right"][nowrap]')
excludes all other td tags, but includes both types above.
html css css-selectors nokogiri
Prakash murthy
source share