Ooh, TIL about https://github.com/wader/fq (packaged in debian/ubuntu as fq.) "jq for binaries" - for example fq -crV '.program_headers[1].data' /bin/ls - but it also has an html parser, so curl | fq -r -d html '.html.head.meta[]|select(."@property" == "og:description")."@content"' gets the OpenGraph thumbnail description. (This would have been helpful back in December, I ended up writing a helper script that used BeautifulSoup - which was probably still the correct choice in the end :-)