Using wget to resume downloads that require cookie credentials

I’ve been having an issue recently (not sure if it’s the Mac) but it has indeed become very apparent to me, that I would download things (applications / videos / ISOs / etc) in Firefox and the download would ‘finish’. It shows it as completed in the downloads window but in fact it is a truncated download. As seen in the screenshots below the SDK finished at 1.6GB when in fact the actual full file size is 2.1GB.

Misleading completed Firefox download

I initially tried using wget to download the file but got a ERROR 403: Forbidden error probably due to some cookie credentials. So not wanting to waste my 1.6GB download that took about 12 hours I resorted to looking into getting wget to work with cookies and was happy to see that the folks who created wget indeed had an option to load the cookies file. Sweet! Very sweet indeed. So next task was to get the cookies out of Firefox which was a bit more of an issue.

Export Cookies was known to work but it was not compatible with Firefox 3.5 so I had to download the Nightly Tester Tools to allow Export Cookies to work. Export the cookies (“Tools > Export cookies”) and in Terminal/Command line and enter the wget command to resume the download as follows:
wget --server-response --continue --load-cookies cookies.txt http://location/of/download

Download wget (Windows | Mac)

Advertisement

3 Responses to Using wget to resume downloads that require cookie credentials

  1. Shaunak De says:

    I was downloading the Xillinx ISE and got stuck at 3.47 GB [of 3.8 GBs !!]

    Oh the frustration.

  2. sumodirjo says:

    Why don’t you use wget or another download accelerator / download manager?

    • thewheat says:

      Didn’t find any good download managers for OS X to be honest, thus wget is my only solution. If you have any other recommendation do let me know =)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 704 other followers