Hacker News new | ask | show | jobs
by undume 1303 days ago
xmllint can do that:

  curl example.org | xmllint --html --xpath '//some/xpath/selector' -
1 comments

Only if it's good old HTML 4. libxml2's parser doesn't grok HTML 5.