Skip to content

Instantly share code, notes, and snippets.

View mslinnea's full-sized avatar
🏠
Working from home

Linnea Huxford mslinnea

🏠
Working from home
View GitHub Profile
@cvan
cvan / HOWTO.md
Last active April 15, 2024 04:01
get all URLs of all network requests made on a web page from the Chrome Dev Tools (from an exported HAR)

Setup

Using Homebrew on Mac OS X:

brew install jq

Add these aliases to your profile (e.g., ~/.zshrc, ~/.bashrc, ~/.profile, etc.):

alias hurlp='pbpaste | jq ".log.entries" | tee >(jq --raw-output "[.[] | .request.url] | sort | unique | .[]")'

alias hurld='pbpaste | jq ".log.entries" | jq --raw-output "[.[] | .request.url] | sort | unique | .[]" | harurls | tee >(xargs -n 1 curl -O $1)'