Htmlq

From wikinotes

htmlq is similar to jq, it allows you to use CSS selectors to extract info from HTML in shellscripts.

Documentation

github https://github.com/mgdm/htmlq

Install

pacman -S htmlq    # Arch
pkg install htmlq  # FreeBSD

Usage

cat foo.html | htmlq '#some-element-id'  # extract by css