Seems like you could do that in a reasonably thorough way on HN with an ad block filter.
news.ycombinator.com##tr.athing:has(a[href*="medium.com"])
news.ycombinator.com##tr.athing:has(a[href*="medium.com"]) + tr
news.ycombinator.com##tr.athing:has(a[href*="medium.com"]) + tr + tr.spacer
If somebody can improve this, please share.