Toot

Written by Duncan Bayne on 2025-01-07 at 04:02

I just discovered htmlq (think jq but for HTML not JSON) and it's great!

for url in $(cat ~/tmp/urls.txt)

do

 echo $url

 curl --silent -H "Accept: text/html" $url | htmlq "meta[property^='og:']"

 echo

done

... generates me a nice summary of the OpenGraph tags for each URL in urls.txt.

[#]shell #cli #html #rust

=> More informations about this toot | View the thread | More toots from duncan_bayne@bsd.cafe

Mentions

Tags

=> View shell tag | View cli tag | View html tag | View rust tag

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113785080084702919
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
252.586592 milliseconds
Gemini-to-HTML Time
0.711577 milliseconds

This content has been proxied by September (ba2dc).