2 ms·
- "This rule isn't perfect as it only removes the title line and keeps the number of comments" Try a pattern like this, to match three <tr/>'s in a row: :
by perihelions 3y ago
- "This rule isn't perfect as it only removes the title line and keeps the number of 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).
- h_o_o_t 3y agoThis is seamless, nice one! 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])
- h_o_o_t 3y agoI've just seen your post from 3 days ago too :) 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]) ... https://news.ycombinator.com/item?id=38471347 https://news.ycombinator.com/item?id=38471347