Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

What's the format of the "natescapes" cookies.txt when I need to mirror a website that requires login. I use some chrome extension that returns cookies in that format, I save them in cookies.txt, import with wget command but no use, it just downloads content like I'm not logged in at all

Appreciated any help

share|improve this question

1 Answer 1

One way of getting cookies for wget is to use the --keep-session-cookies options of wget.

For example :

wget --keep-session-cookies --save-cookies cookies.txt "http://MYSITE/?__login=USER&__password=PASS"

The ?__login etc depends on the web site you're trying to mirror, you might have to look at how the authentication form works.

Then you can use :

wget --mirror --load-cookies cookies.txt http://MYSITE/
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.