Hey Matt,
If you want to parse data you're most likely going to have to learn a few new tricks.
If you're going to work with JSON then obviously you'll want to learn how to use native tools, because ultimately they'll be more flexible and easier to use.
However...
Basic data parsing such as your original post isn't all that hard with a little knowledge of the shell and/or some RegEx.
Here's a basic Keyboard Maestro macro that uses the coin name to return the ID for a given list of coin names from your listings URL. (You could use the symbol instead, but that would take a bit of recoding.)
Web -- Scraping Currency Data (Keyboard Maestro) v1.00.kmmacros (7.9 KB)
Here's a really basic shell script that returns the info-record for a given list of coin names in a pop-up window.
It's slightly more complex than necessary, because I put the currency name list at the top – where it's easy to modify.
Web -- Scraping Currency Data (shell) v1.00.kmmacros (5.2 KB)
This macro is less basic.
It takes a given list of coin symbols and returns the complete data for each of them from the ticker API.
The report is displayed in BBEdit if you have its command line tools installed, otherwise it's displayed in TextEdit.
Web -- Scraping Currency Data (shell) v2.00.kmmacros (7.2 KB)
I'm not super happy with this due to the verbosity of the script, but I was trying to stick with sed
– and it has certain limitations. Even so the script runs only 21 lines, and it's fast.
I didn't feel like taking the time to make this one quite as user-friendly, so the coin symbols are “buried” in the code.
If I feel like it later I'll take one more pass at this in the way I'd normally do it for myself.
So – now you have a few examples.
Don't worry if it all looks like Greek. When I started doing this stuff I was pretty bug-eyed at all the weird syntax of the shell.
-Chris