[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] CNET download links not working with WGET

From: Micah Cowan
Subject: Re: [Bug-wget] CNET download links not working with WGET
Date: Wed, 08 Jun 2011 11:38:39 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110516 Thunderbird/3.1.10

If you read the most recent output of wget that you gave (after quoting the URL), it _does_ treat the string of characters as a whole URL. The server redirects it to a shorter URL. If I enter that same URL into a browser, it does the same redirection there, and results in an HTML page, just like what wget gets. That page seems to have some JavaScript or something that initiates a separate download of something else; I suppose that something else is what you wanted. As you may know, wget doesn't execute JavaScript code from a webpage, so you'll need to find the real URL to the thing you wanted to download, and feed that to wget.


On 06/08/2011 09:38 AM, Jeff Givens wrote
No, it's not working. It downloads part of the URL and creates a file
named address@hidden
which is 68 KB. I cannot wget to treat the string of characters as a
whole URL. Please help, I really need to get this script working and the
only place to download this file is from CNET.

So... looks like it works, then. Your command shell isn't complaining
about weird command names, wget is clearly requesting the full and
correct URL, it follows redirections, and saves using the final
redirection URL (the latest sources wouldn't follow that last step -
it'd save using the request URI by default).

If you dislike the filename, then provided you have a recent enough
version of wget you can add the --content-disposition option if the
server provides a rename header ("Content-Disposition"); or else use -E
to have wget force the file name to end in .html


(05/26/2011 12:19 PM), Jeff Givens wrote:
Hi, I know this is an older topic but thanks for replying. I forgot to
mention I had already what you listed below and this is the output I

C:\DOWNLOAD>wget "http://dw.com.com/redir?edId=3&siteId=4&oId=3000-8022_



--2011-05-02 12:34:20--



Resolving dw.com.com...
Connecting to dw.com.com||:80... connected.
HTTP request sent, awaiting response... 302 Found
d0db9532bd610588f [following]
--2011-05-02 12:34:21--
Resolving download.cnet.com...
Connecting to download.cnet.com||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to:

[<=> ] 69,240 77.3K/s in 0.9s

2011-05-02 12:34:22 (77.3 KB/s) -
d0db9532bd610588f.1' saved [69240]


Thanks for your help.

- Jeff

reply via email to

[Prev in Thread] Current Thread [Next in Thread]