Using Homebrew on Mac OS X:
brew install jq
Add these aliases to your profile (e.g., ~/.zshrc
, ~/.bashrc
, ~/.profile
, etc.):
alias getUrls='pbpaste | jq ".log.entries" | tee >(jq --raw-output "[.[] | select(.request.method == \"GET\")|.request.url] | .[]")'
alias getUrlsTime='pbpaste | jq ".log.entries" | tee >(jq --raw-output "[.[] | select(.request.method == "GET")|.request.url,"blocked :"+(.timings.blocked|tostring),"wait: " + (.timings.wait|tostring), "receive: " + (.timings.receive|tostring)] | .[]")'