by perihelions · 3y ago · 0 comments
Try a pattern like this, to match three <tr/>'s in a row:
:xpath(.. | ../following-sibling::tr[1] | ../following-sibling::tr[2])
(Or a cyclic permutation of it, depending on which <tr/> you're anchoring to).6 points by perihelions:
news.ycombinator.com##.title:has-text(/\b(Elon|Altman|OpenAI)\b/i):xpath(.. | ../following-sibling::tr[1] | ../following-sibling::tr[2])
...For anyone else:
news.ycombinator.com##table:not(.fatitem) tr > td.title:has-text(/{phrase1}|{phrase2}/):xpath(.. | ../following-sibling::tr[1] | ../following-sibling::tr[2])