cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Resolving Indirect Download Links

From: Raymond C. Glassford <rcglassford_at_copper.net>
Date: Mon, 6 Oct 2008 17:07:19 -0500

> Message: 1
> Date: Sat, 04 Oct 2008 16:15:20 -0400
> From: Wei Weng <wweng_at_acedsl.com>
> Subject: Re: Resolving Indirect Download Links
> To: the curl tool <curl-users_at_cool.haxx.se>
> Message-ID: <48E7CED8.2070106_at_acedsl.com>
> Content-Type: text/plain; charset=us-ascii
>
> Raymond C. Glassford wrote:
> > I would like to know if there is a procedure, perl script or otherwise,
> > that will resolve indirect download links contained on referer pages,
> > then make the resolved links available to curl for downloading, with as
> > little user interaction as possible.
> >
> > As an example, see the links contained on the "Downloads" page at:
> >
> > http://www.java.com
> >
> > where I want to download the self-extracting Linux binary,
> > named "jre-6u7-linux-i586.bin" using curl, not the Mozilla Firefox
> > download manager.
> >
> > I am running curl 7.15.5 under Mandriva Linux 2007.0.
> > -------------------------------------------------------------------
> > List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
> > FAQ: http://curl.haxx.se/docs/faq.html
> > Etiquette: http://curl.haxx.se/mail/etiquette.html
>
> Raymond,
>
> Is
> http://dl8-cdn-01.sun.com/s/ESD44/JSCDL/jdk/6u7/jre-6u7-linux-i586.bin?e=12
>23150744305&h=52c3fe79a1b3035c9f399a02b31cc76a/&filename=jre-6u7-linux-i586.
>bin the one that you are looking for?
>
> I used "curl
> "http://dl8-cdn-01.sun.com/s/ESD44/JSCDL/jdk/6u7/jre-6u7-linux-i586.bin?e=1
>223150744305&h=52c3fe79a1b3035c9f399a02b31cc76a/&filename=jre-6u7-linux-i586
>.bin" -o java-linux.bin" to download it.
>
> Thanks
> Wei
>
>
>
> ------------------------------
>
> Message: 2
> Date: Sun, 5 Oct 2008 19:11:20 -0700
> From: Dan Fandrich <dan_at_coneharvesters.com>
> Subject: Re: Resolving Indirect Download Links
> To: curl-users_at_cool.haxx.se
> Message-ID: <20081006021119.GB22716_at_coneharvesters.com>
> Content-Type: text/plain; charset=us-ascii
>
> On Sat, Oct 04, 2008 at 09:09:17AM -0500, Raymond C. Glassford wrote:
> > I would like to know if there is a procedure, perl script or otherwise,
> > that will resolve indirect download links contained on referer pages,
> > then make the resolved links available to curl for downloading, with as
> > little user interaction as possible.
>
> Are you looking for the --location option?
>
> >>> Dan

Yes, Wei, you found the full path to the download I want. And yes, Dan, it is
the "-L" or "--location" option I need to use, along with the "-i" option.
So, the Konsole command-line for me reads as follows:

curl -i -L -m 3600 -o java-linux.bin -v -# <URL>

I limit my download sessions to a maximum of 3600 seconds, due to limitations
imposed by my dial-up ISP, thus the "-m 3600" option.

This, by the way, is a URL I cited just as one example. I will be using this
procedure regularly for other downloads, now that I have been led in the
right direction. Many people seem to be using perl scripts and wget to
achieve similar results, where they could be using curl alone.

Thanks very much for the assistance.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-10-07