@eaton
I sometimes use Pup to get the contents of pages I curl by CSS-selector. It's sub-process, so not applicable for your use-case, but for example; if someone, like the UK government were to store all registered company data on a HTML web-page...
https://github.com/Lewiscowles1986/OpenData/blob/5b8793ede695ef3590f11e19a08b064370629000/companies-house/run.sh#L4-L5 is an example of the current selector to get a URL value.
There is no exit code for a failed match though, so using `[[ -z "${yourvar}" ]]` can be a good way to catch empty content.