Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
How do I use wget/curl to download from a site I am logged into?

I want to ask if I can download from 4shared.om via terminal? I tried to use

wget http://dc379.4shared.com/download/cm3oo7bA/Applied_radiological_Anatomy.pdf?tsid=20120817-033302-fa3ef03c

and

wget --max-redirect=1000 http://dc379.4shared.com/download/cm3oo7bA/Applied_radiological_Anatomy.pdf?tsid=20120817-033302-fa3ef03c

and

curl http://dc379.4shared.com/download/cm3oo7bA/Applied_radiological_Anatomy.pdf?tsid=20120817-033302-fa3ef03c

but none of them do the task. Can you help me?

share|improve this question

marked as duplicate by nitstorm, jokerdino, Jorge Castro, ajmitch, fossfreedom Aug 20 '12 at 10:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Thank you very much :) i did it :) –  ossama Aug 17 '12 at 8:18
    
Most welcome :) –  nitstorm Aug 17 '12 at 9:00

3 Answers 3

Well,I just downloaded it.

In your first command you used

wget http://dc379.4shared.com/download/cm3oo7bA/Applied_radiological_Anatomy.pdf?tsid=20120817-033302-fa3ef03c

instead of that use only upto the .pdf extension. That is

wget http://dc379.4shared.com/download/cm3oo7bA/Applied_radiological_Anatomy.pdf
share|improve this answer
    
I opened the file,but its not working. –  Schweinsteiger Aug 17 '12 at 9:12
2  
it tried the command but it didn't work as 4shared needs login and some cookies. so the file you downloaded was just html page. I followed the this steps and it works: 1 - I installed Export cookies plugin in firefox addons.mozilla.org/en-US/firefox/addon/export-cookies 2 - i open the file page on 4shared and choose "download" then "free download" then copied the link as in this screenshot i.imgur.com/du6vt.jpg 3 - i saved the cookies to cookies.txt and use the following command wget --load-cookies=cookies.txt http://{the link i copied} it works :) –  ossama Aug 17 '12 at 9:45

You can't download directly from 4shared. 4shared does not allow to download directly. You can download directly if you have premium account but cannot download from terminal.

share|improve this answer
    
Thank you for answer. I can get a link that will work for several minutes. when i past it in a browser it will work. i can get as shown in the following screenshot i.imgur.com/du6vt.jpg –  ossama Aug 17 '12 at 4:06

Thanks to nitstorm:

I followed these steps and it works:

  1. I installed Export cookies plugin in Firefox.

  2. I open the file page on 4shared and choose "download" then "free download" then copied the link as in this screenshot.

  3. I saved the cookies to cookies.txt and use the following command

    wget --load-cookies=cookies.txt http://{the link i copied}
    

It works.

share|improve this answer

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