3 ms·
With long options, JSON output, and no extra Python dependencies: rip() { curl \ --data-urlencode "q=${1}" \ --get \ --he
by l0b0 5y ago
With long options, JSON output, and no extra Python dependencies:
rip() {
curl \
--data-urlencode "q=${1}" \
--get \
--header 'Content-Type: application/json' --header 'Accept: application/json' \
--silent \
'https://dontbeevil.rip/search' \
| jq '[ .hits.hits[] | { title: .fields.title[0], url: .fields.url[0], highlight: .highlight.text[0] } ]'
}