I would like to get the result of this search and display the result in a notification or safari popup.
" set result to do shell script "curl https://www.binlist.net/json/" & cc without altering line endings" only have as a result the same value of the main query
-- Web site https://www.binlist.net
-- Get https://www.binlist.net/json/431940
set cc to the clipboard
set finalresult to do shell script "curl https://www.binlist.net/json/" & cc without altering line endings
set the clipboard to finalresult
display notification "result is " & finalresult
The result won't display as a notification so for now, its only set as clipboard Also the result is really raw can I clean that somehow ?
{\"bin\":\"431940\",\"brand\":\"VISA\",\"sub_brand\":\"\",\"country_code\":\"IE\",\"country_name\":\"Ireland\",\"bank\":\"BANK OF IRELAND\",\"card_type\":\"DEBIT\",\"card_category\":\"\",\"latitude\":\"53\",\"longitude\":\"-8\",\"query_time\":\"1.370709ms\"}""
Thanks.
431940
on the clipboard and thefinal result
set back to the clipboard was exactly what I see if looking at binlist.net/json/431940 in Safari. So not sure what your issue is with formatting other the the results displayed in Script Editor e.gset the clipboard to "{\"bin\":\"431940\...
the backslashes show there are not on the clipboard. Are you saying they are?