R
R
redcircle2021-01-06 21:52:15
Wget
redcircle, 2021-01-06 21:52:15

How to download wget using browser cookies?

You need to export data many times to a known URL on the site (only the query parameters change). The solution is to use a wget or curl call from a bash script.
On the site, for this, I must first log in to the browser, after which the authorization tokens will be stored in cookies.

The question is how exactly to specify wget or curl so that it uses cookies from the browser (browser and wget run on the same machine from under the same user)?
You can use any browser from the list: Firefox, Chrome, Safari, for which it is easier to do.
Please do not suggest using third-party browser extensions.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-01-06
@vabka

Cookies are sent to the server in the "Cookie" header.
You need to get them from the browser and copy them into a curl or wget call (you need to get them manually. curl and wget cannot do this themselves)
wget: https://www.linuxsecrets.com/1467-using-custom-htt...
curl: https://www.shellhacks.com/ru/curl-add-header-mult...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question