How to download the file using wget on an authenticated website?

Asked

Viewed 737 times

2

I am trying to download a backup file that is located on an authenticated website using wget. I tracked the http behavior when I log in through my browser and these are the parameters:

https://quire.io/login
continue: 
s_password: fakepass
s_rememberMe: true
s_username: [email protected]

POST https://quire.io/login
Origin: https://quire.io
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Referer: https://quire.io/
Accept-Encoding: gzip, deflate, br
Accept-Language: pt-BR,pt;q=0.8,en-US;q=0.6,en;q=0.4
Cookie: _gat=1; qrui=!; DARTSESSID=50e062c9xxxe886805xxx01c156fdb1e; _ga=GA1.2.90xxxx980.149xxxx972; _gid=GA1.2.260xxxxx3.1496xxxxx6

I tried some indicated solutions, but none of them worked. I tried:

wget --user=myusername --password=mypassword https://test.mydomain.com/files/myfile.zip

I tried too:

   # Log in to the server.  This can be done only once.
   wget --save-cookies cookies.txt \
    --post-data 'user=foo&password=bar' \
    http://server.com/auth.php


   # Now grab the page or pages we care about.
   wget --load-cookies cookies.txt \
    -p http://server.com/interesting/article.php

I tried other ways too, but unsuccessfully:

My URL download is similar to this:

https://quire.io/r/export/project/projectName/file.csv
  • Hello, could you translate your question?

1 answer

1


 wget -c -r http://site/arquivos.zip --http-user=usuario --http-passwd=senha

-r to be recursive -c download continuity

Browser other questions tagged

You are not signed in. Login or sign up in order to post.