Hacker News new | past | comments | ask | show | jobs | submit login

I have had mostly good success using wget and a cookie.txt file exported from chrome with https://chrome.google.com/webstore/detail/cookietxt-export/l...

But it's not so convenient. I'll have to try this in future.




Even better, Chrome's developer options allows you to right click in the HAR and do a "Copy as CURL" which includes all the bells and whistles (headers, cookies) to throw it into terminal and start hacking away.


This is awesome. But, does anyone know how to do this with `--save-cookies` command with wget?


I remember crafting something similar along the lines of this (incorrect argument names almost assuredly):

curl $url_that_has_cookies -c -

That will save the cookies to stdout, and IIRC you can pipe them to curl. I've done similar stuff with wget along the lines of just saving the cookies and then loading them within a single command.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: