Example: http://www.mediafire.com/?tjmjrmtuyco

This was what I tried...

wget -A rar [-r [-l 1]] <mediafireurl>

That is to say, I tried with and without the recursive option. It ends up downloading an HTML page of a few KB in size, while what I want is in the range 90-100 MB and RAR.

What happens with MediaFire for those who may not be aware, is that it first says

Processing Download Request...

This text after a second or so turns into the download link and reads

Click here to start download..

I would appreciate it if someone would tell me how to write a proper script for this situation.

link|improve this question
2  
This is probably not allowed according to the Mediafire TOS and they will do their best to make it as hard as possible for you to do. – Joachim Sauer Jul 19 '11 at 11:38
feedback

migrated from stackoverflow.com Jul 19 '11 at 11:58

This question came from our site for professional and enthusiast programmers.

1 Answer

I've never tried myself, but there are a few things you could try to "cheat" the website.

For example --referer will let you specify a referer URL - maybe the site expects you to come from a specific "home" page or something: with this option wget will pretend it's coming from there.

Also, --user-agent will make wget "pretend" it's a different agent - namely, a browser like Firefox.

--header will let you forge the whole HTTP request to mimic that of a browser.

If none of those work, there are also more options, dealing with cookies and other advanced settings: man wget for the whole list.

I hope this helps a bit: if you succeed, please post how you did it!

link|improve this answer
feedback

Your Answer

 
or
required, but never shown