I have some doubt on wget command. Here is the thing I want to achieve. I want to download a tar package from this link "http://snapshots.linaro.org/oneiric/lt-origen-oneiric/20120321/0/images/hwpack/hwpack_linaro-lt-origen_20120321-0_armel_supported.tar.gz" .. This link is working fine when I am using it in browser to download the package, but when I use the same link to download it through wget command, its redirecting to "http://snapshots.linaro.org/licenses/samsung-v2.html" link which is acceptance of license agreement and instead of downloading the tar file, it is downloading the license agreement file. So, what option should I provide so that it will download the desired tar file and the license agreement file. Please help me on this issue.
相关问题
- How can I download web page with dependencies in J
- How do I use the --accept-regex option for downloa
- Loop of form “for i in {1..171}” not working (only
- wget for fetching Facebook profile/friend pages
- How to download a page with wget but ignore 404 er
相关文章
- Running a php script using wget and Windows Schedu
- Wget and Curl stopped working with HTTPS. Wrongly
- wget: Checking for file timestamp and overwriting
- Capturing the output of bash time in script variab
- What is the equivalent of wget in javascript to do
- Equivalent of wget in Python to download website a
- Using wget via Ruby on Rails
- Curl and wget: why isn't the GET parameter use
You should replicate with wget the same actions you would do with a web browser. The first step is to see what are the http requests that are executed when you ask for the license page, and for the confirm button.
To do this you can use firebug or livehttpheaders. Once you have the urls (with post/get params) you can reproduce it with a shell script and multiple wget calls.
If the website tracks cookies, you will need to instruct wget to keep them in a cookiejar and use said cookiejar for further requests.
In your case the first request is
for which you get a cookie and a redirect
when you click on the accept button
you get another cookie and another location (which is the file you want to donwload)