Junk Food for the Brain

Open Source and Awesomesauce :)

How to Download Using a Rapidshare Premium Account in Linux

| Comments

For a lot of people, the lack of a proper downloader in linux to use with their premium rapidshare accounts seems to be quite a turn off. Well, there’s jDownloader, but I find that a bit too heavy. Unknown to them, they already have a good downloading tool, called wget.

Its basically a two step process being:

  1. Saving a cookie with your Rapidshare login details in it. To do that, just enter the following command:
$ wget --save-cookies ~/cookies.txt --post-data "login=USERNAME&password;=PASSWORD" -O - https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi > /dev/null

Replace USERNAME & PASSWORD with your own Rapidshare details. What this script does is login to Rapidshare and saves the cookie to a file named cookies.txt in your home directory. Any normal HTML output is piped to the resident unix blackhole, /dev/null.

  1. Downloading your file using the cookie to supply your Rapidshare credentials. Now that we’ve saved your cookie information, you can go ahead and download to your heart’s content (or maybe daily limit). Here’s an example of how you’d do that. Remember that the cookie you created previously was stored in your home directory. For most linux shells, you can refer to it like this:- ~/cookies.txt
    To actually download, use the following command:-
wget --load-cookies ~/cookies.txt your-rapidshare-url.com/file-link.html

Happy downloading. :)