Hacker News new | ask | show | jobs
by m463 2449 days ago
I wrote a subroutine macos python to do the opposite.

On macos, requests is not included (although it can be installed with a little effort), but curl was there.

Note that you can easily automate interacting with a web page using the developer menus in safari and firefox.

monitor the network requests, then for the request you're interested in, use "copy as cURL'. You can copy/paste that to invoke curl in the same way the web page used it.

(sometime I have to use --cookie-jar /tmp/cook --cookie /tmp/cook)