Super User Asked by klaatu_nikto on January 31, 2021
I’m tryng to always download the latest version of WinRAR in my language from the official site with cURL but can’t figure out how the redirect link works.
The site https://www.win-rar.com/postdownload.html?&L=6&Version=32bit read the user agent to download the corresponding language version.
I try the following code whitout success:
curl -L --output winrar.exe -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0" "https://www.win-rar.com/postdownload.html?&L=6&Version=32bit"
curl --output winrar.exe -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0" "https://www.win-rar.com/postdownload.html?&L=6&Version=32bit"
curl --output winrar.exe -H "Host: www.win-rar.com" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0" -H "HTTPS: 1" -H "DNT: 1" -H "Referer: https://www.win-rar.com/postdownload.html?&L=6&Version=32bit" -H "Accept-Language: es-AR,es;q=0.8,en-US;q=0.5,en;q=0.3" -H "Accept-Encoding: gzip, deflate, br" -H "DNT: 1" -H "Connection: keep-alive" -H "Cookie: fe_typo_user=8820621858ced675661c51c70cf0015f; cookieDisclaimer=0" -H "Upgrade-Insecure-Requests: 1" -H "Sec-GPC: 1" -H "TE: Trailers" https://www.win-rar.com/postdownload.html?&L=6&Version=32bit
Can somebody help me?
I managed to do it with wget using darnir answer in https://stackoverflow.com/a/53288469
wget -r -l 1 --span-hosts --accept-regex=.*win-rar.com/fileadmin/winrar-versions/winrar/.*.exe -erobots=off -nH https://www.win-rar.com/postdownload.html?&L=6&Version=32bit
Answered by klaatu_nikto on January 31, 2021
you may check the real world at "rarlab.com" NOT "win rar". same content/manufacturer. there you get a full url that works using 'wget' or 'curl' otherwise you get a download depending of your running OS/Browser/client
Answered by f b on January 31, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP