I am trying to download several mp3 files using a script in java. The purpose of the script is to obtain direct mp3 links via 4shared. I get the direct links fine. The problem is, I am an unable to download the mp3 file programatically.. An example link would be:
http://4shared.com/img/8dSuOD2s/dlink__2Fdownload_2F8dSuOD2s/preview.mp3
If i try to save this programatically, the link gets redirected to a 4shared html page and I get a small (100kb) html page downloaded. However if I create a html link to this file (i.e. an anchor tag with a href) and right click-> save target as, it will save the mp3 fine...
Can anyone give me some insight to whats going on here?
Edit: After monitoring the traffic from the website as @Perception recommended (using firefox's web-developer's console) I get this response.. which I do not understand
Screenshot: https://i.sstatic.net/dQkNZ.png
Anyone?...
Some times ago WebDAV really worked on 4shared. But near month ago access by direct links began return "error 500" and no more way to download files from WebDAV. Our application has plugin for 4shared and it doesn't work any more. I found a few other posts in Internet with the same problem. I asked this question on 4shared forum, but it was removed. I think the reason is 4shared doesn't allow "direct links" for free accounts and WebDAV link really is just http-link, so no way to allow WebDAV links and deny "direct links". Also 4shared, of course can't say "No more WebDAV support" - because it is shame to remove useful features. That is why no any info in official site, that is why my post was removed and that is why you still have no any good answers for your question.