htmlq

Extract HTML content using CSS selectors from the command line

brewmacoslinux
Try with needOr install directly
Source

About

Uses CSS selectors to extract bits content from HTML files

Commands

htmlq

Examples

Extract all paragraph text from an HTML file$ htmlq 'p' index.html
Get the href attribute from all links$ htmlq -a href 'a' page.html
Extract content from HTML piped via stdin$ curl https://example.com | htmlq '.container h1'