I need to download a package via command line, but the page forces you to press an accept license button to start the download. Is there a way to get around that requirement with wget or curl?
https://bintray.com/jfrog/xray/download_file?file_path=xray-centos-2.11.0.tar.gz
2
Answers
Even finding the real URL to download the file on akamai, it seems complicated to generate the proper
REQUEST_URI
, because there’s an EPOCH time in theexp
parameter, and if you modify it, it will return a403 forbidden
.And like Barmar said in comments, to figure out how to request the file, you have to understand what do the javascript on the page and do it programmatically.
The simplest solution (apart if you successfully do what I explain) is to code with nodejs and puppeteer to mimic what a human do: click on the button, etc…
Just add the parameter “agree=true” to the URL.