Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

wget is a very useful tool to download stuff on the internet quickly, but can I use it to download from hosting sites, like FreakShare, IFile.it Depositfiles, Uploaded, Rapidshare? If so, how can I do that?

share|improve this question
Don't most of those sites tend use javascript and other barriers to eliminate linking directly to the files? – Tim Jul 13 '12 at 17:08
@Tim I think you are correct, because it's impossible to get a direct link from those sites. – Zignd Jul 14 '12 at 14:54
@swift Could you please translate it to english and post on pastebin or somewhere else – Zignd Jul 14 '12 at 18:20
up vote 11 down vote accepted

This kind of site tries to make it difficult not to use a graphical web browser, because if you use wget you'll be missing all these ads that pay for the bandwidth.

Some sites don't make advanced checks and can be tricked easily: tell wget to pretend that it's really Mozilla and that it's coming from the download site.

wget --user-agent='Mozilla/5.0 (Windows NT 6.0) Gecko/20100101 Firefox/14.0.1' \

Most sites that check let you get away with --user-agent=Mozilla and --referer set to the URL of the file you're downloading.

With some sites, you might need to export the web browser cookies and pass --load-cookies to wget; at this point using wget starts to be more work than a manual download. The ultimate method, which can work all the time but requires some coding for each site, is to use a browser automation framework such as Selenium or Watir.

See also Does anybody here have experience in automating some tasks in web applications using curl?

share|improve this answer
Awesome! Your answer helped me write this for Zippyshare Links: stackoverflow.com/a/21100640/1533054 – Sheharyar Jan 13 '14 at 20:23

For Zippyshare:

This method builds up on Gilles' answer. Like he said, the trick is to make the server think that the request is being made from a browser and to make that happen, you need a couple of things:

  • The Download Link (The actual link to the file)
  • Link Referrer (The webpage with the download button)
  • Zippyshare Session ID (Found in Cookies)

Here's a screenshot explaining where you can get each item:

Download From Zippyshare

Now open up your terminal, and use the following command (replacing necessary items):

wget <download_link> \
--referer='<referrer>' \
--cookies=off --header "Cookie: JSESSIONID=<session_id>" \
--user-agent='Mozilla/5.0 (Windows NT 6.0) Gecko/20100101 Firefox/14.0.1'


wget http://www16.zippyshare.com/d/29887835/8895183/hello.txt \
--referer='http://www16.zippyshare.com/v/29887835/file.html' \
--cookies=off --header "Cookie: JSESSIONID=26458C0893BF69F88EB5743D74FE0F8C" \
--user-agent='Mozilla/5.0 (Windows NT 6.0) Gecko/20100101 Firefox/14.0.1'

Note: In the command, it is in fact referer not referrer

share|improve this answer
I'd just like to add that Sheharyar uses Firebug in this screenshot. This is to everybody (including me) who tried to do this in Inspector (which is unfortunately not possible). – syntaxerror Jun 8 '15 at 16:11

I also would like to above perfect answers, I used following trick for downloading a child movie for my son from Turbobit:

Instead of SESSION_ID from above answer, you need to find "compid" from the cookie tab of FIREBUG:

enter image description here

After that, the command for my debian embedded system was soo easy:

wget --referer='http://http://turbobit.net/download/free/yilmacr4e351' --cookies=off --header "Cookie: compid=c9255510c34624435292d8a0e7e405be66aa01f9%7ED01343F87AB53A2C38D957A564DA1D55" --user-agent='Mozilla/5.0 (Windows NT 6.0) Gecko/20100101 Firefox/14.0.1' http://turbobit.net/download/redirect/B3EDACDA9B899937A149D5AAB6662327/yilmacr4e351/Ters.Yuz.2015.1080P.WEBDL.TR.EN.mkv &

I can shut down my computer now :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.