by unhammer · 11y ago · 0 comments
$ sudo apt-get install html-xml-utils jq
$ curl 'https://duckduckgo.com/html/?q=cake' | hxclean \
| hxselect .web-result:first-child .snippet
$ curl apy.projectjj.com/listPairs | jq .responseData[0]
Though I'd typically use Python's BeautifulSoup for anything major with html, there's just too much bad html out there ;)