You know those songs on Raaga, MusicIndiaOnline, etc? The ones you can listen to but can’t download?
Well, you can download them.
It’s always been possible to download these files. After all, that’s how you get to listen to them in the first place. What stopped you is security by obscurity. You didn’t know the location where the song was stored, but if you did, you could download them.
So how do you figure out the URL to download the file from?
Let’s take a look at MusicIndiaOnline first. When you click on a song, it pops up in a new window. You can’t figure out the address of that window because the address bar is hidden, but you can get it by hovering over the link before clicking, or by right-clicking and copying the link location. It’s always something like this:
http://www.musicindiaonline.com/p/x/FAfgqz0HzS.As1NMvHdW/
It always has the same structure: http://www.musicindiaonline.com/p/x/something/. Let’s call that the something the song’s key.
Now, what this page does is play a .SMIL file. An SMIL file is a text file that has a list of songs to play. This file is always stored at
http://www.musicindiaonline.com/g/r/FAfgqz0HzS.As1NMvHdW/play2.smil
(Notice that the key remains the same.) If you type this into your browser, you’ll get a text file that you can open in Notepad. You’ll find that it has a bunch of lines, two of which are interesting. There’s one that reads:
The content="…" part gives you the first part of the song’s address. Then there’s a line that reads:
The src="…" part gives you the rest of the address. Putting the two together, you have the full URL at which to download the song.
Except, they’re a bit smart about it. These songs are meant to be played on RealPlayer, and not downloaded. So if you try to access the page using your browser, you get a 404 Page not found error. But if you typed the same page into RealPlayer, you can hear the song play.
To actually download the song, you need to fool the site into thinking that your browser is RealPlayer. So first, you need to get a good browser like Firefox. Then download the User Agent Switcher add-on. Change your user agent to “RMA/1.0 (compatible; RealMedia)” and try the same song: you should be able to download it.
Let me summarise:
- Right-click on the song you want to play, and copy the URL
- Extract the key. In the URL http://www.musicindiaonline.com/p/x/FAfgqz0HzS.As1NMvHdW/ the key is FAfgqz0HzS.As1NMvHdW
- Open http://www.musicindiaonline.com/g/r/<your_key>/play2.smil in your browser. Open it with Notepad
- Switch the user agent on your browser to “RMA/1.0 (compatible; RealMedia)”
- Put the content="…" and audio src="…" pieces together to form the URL
- Type the URL and save the file
I’ve automated this in my music search engine. So if you go to the Hindi, Tamil or any other online music page and click on the blue ball next to the song, you’ll see a menu with a download option. The download opens a Java program that does these steps for you and saves the song in your PC.
So now, you’re probably thinking:
- How did he figure this out?
- What about other sites?
- How does that Java program work?
- How do I listen to these on my iPod?
How did I figure this out?
I believe a good measure of a tool’s power is it’s ability to be the one-word answer to a relatively broad question. For example, “Where can I find more about something?” “Google it.” “How do I improve my pictures?” “Photoshop it”.
Fiddler’s like that. “How do I find out what I’m downloading?” “Use Fiddler”.
It’s a proxy you can install on your machine. It automatically configures your browsers when you run it. Thereafter, it tells you about all the HTTP requests that are being sent by your machine. So if you patiently walk through the logs, you’ll find all the URLs that MusicIndiaOnline or any other site uses, as well as the other headers (like User-Agent) that are needed to make it work.
What about other sites?
I’ll list a couple here.
- Right-click on the song you want to play, and copy the URL
- View the source and hunt for the URL fragment “player/ra/ondemand/launch_player.cfm?something”. The key is is something.
- Open http://ww.smashits.com/player/ra/ondemand/playlist.asp?6;giftsToIndia1.rm;1,something in your browser, using Notepad
- Switch the user agent on your browser to “RMA/1.0 (compatible; RealMedia)”
- Type in what’s inside the src="…" in your browser and save the file
- Right-click on the song you want to play, and copy the URL
- View the source and hunt for the URL fragment onclick=“setUsrlist(something)". The key is is something.
- Open http://www.oosai.com/oosai_plyr/playlist.cfm?sng_id=something in your browser, using Notepad
- Switch the user agent on your browser to “RMA/1.0 (compatible; RealMedia)”
- Type in the URL that you see in Notepad and save the file.
Try figuring out the others yourself.
How does the Java program work?
It does most of these steps automatically. The applet itself is fairly straightforward, and you can view it here. It takes two parameters: db, which indicates the server from which to download (M for MusicIndiaOnline, S for Smashits, etc.) and num, which is the key.
But in order for an applet to be able to download files from any site, and to be able to save this on your PC, it needs to be a signed applet. Since Sun offers a tool to sign JAR files, this wasn’t much of an issue.
There is one pending problem with Windows Vista, however. Signed applets can’t save files anywhere on Vista. They are saved in a special folder. This is being fixed, but until then, if you use Internet Explorer on Vista, you probably will be unable to find your saved files.
How do I listen to these on my iPod?
The saved files are in RealMedia format. Your best bet is to convert them to MP3 files using MediaCoder. Then transfer them using iTunes.
Comments
user agent add-on switch was the missing bit.
The quality of these songs are not good enough to download. Anyways, I’m happy someone hacked the fake security built on these sites :)
Did you try it on Raaga and Musicmazza?
Your blog is a publicly accessible site and being in UK you may fall under strict purview of anti-piracy rules
It’s one of those sad things, Vaidya. Something that’s this easy to do shouldn’t have to be illegal. And yet…
it might take me a few months to get there, but it’s definitely right on top
of my priority list.
Right click on the song and select Download.
For other languages, use http://www.s-anand.net/tamil or
http://www.s-anand.net/telugu etc.
Regards,
Anand
Great work! Hats off to you.
I have just had a glimpse of ur site. I haven’t explored it. But its awesome.
Thanks & Regards,
Vanitha
Thanks & continue your good work.
Regards,
Anand
Regards,
Anand
Whether it’s possible in raaga.com…….i tried but I cannot follow ur way………..can u plz explain it using raaga.com as an example……plz
u r great and u r right. Its worked out with musiconlineindia.com. Thank u very much. But I got the song in .rm format. Can we convert this to .mp3 ?
http://mediacoder.sourceforge.net/ and convert to MP3.
Regards,
Anand
Thank u sir, thank u very much……..You have done a great help to me…………I got many songs and I converted it to mp3 with mediacoder……………….It is a great help that u have done to me. I thank u very much.
Satheesh. S
Their songs are in real high quality.
Really i appreciate your great work.
KEEP ROCKING.
Prathibha
it great that you have found something which is useful. But unfortunately I tried your way on www.oosai.com when I types the http://www.oosai.com/oosai_plyr/playlist.cfm?sng_id=2498 no notpad was opening up. So i could not go further. Would you please advice?
cheers
Sujay
I am a new user to itunes and iPhone.
How does 1 arrange music?
I have some mp3 files. Do I copy it all to “audio” and then tag all of it individually?
Where do I put my podcasts?
Is there any website which facilitates hindi mp3 with tags filled in without ambiguity and it has its album art?
I know that itunes might have all of this.
But who wants to pay 40 bucks for 1 song? ;)
When you reply to this comment, please email it to me (I read your blog under bloglines).
Thanks for all your efforts.
http://www.oosai.com/oosai_plyr/play.cfm?sng_id=2498 is a direct link to the
song itself. You will need to download the song using a user agent of “RMA/1.0
(compatible; RealMedia)”.
i’m not sure what happened, but before, whenever i put in a url like that in my web browser, window would pop up asking me if i wanted to save it or open it. but now it saves the file straight into my temp internet files folder and pops up in windows media player so i dont have the option of downloading the song. how can i download it now?
Gmail account. This will convert the URLs into links. You can right-click on
the link and select “Save link as” and place it where you wish.
I have downloaded many songs from you blog. Thanks a lot. But I have some songs which I didnot find in the blog and found in Musicindiaonline. I read the article as to how we can download the songs. But I am not able to change the user agent to RMA compatible in mozilla. can you please guide me.
I would be very happy if you mail me the steps.
Thanks,
Rahul
I finally figured out how to change the user agent and downloaded the songs. I am very happy. Thanks for the help.
Regards,
Rahul
sir this is ram I have downloaded many songs from you blog. Thanks a lot & hats off to u . But I have some songs which I didnot find in the blog and found in Musicindiaonline. I read the article as to how we can download the songs sir plz help me how i can get my faverates songs from raga.com & Musicindiaonline plz helpme .. guide me
sir i m waiting for u r reply
This is an excellent tip to download from musicindi and thank you very much for sharing with all .I manage to open link into mt notepad ,and understood upto content ,however i am having trouble reg src= , i am not sure exaclty what is src= , to copy ,so can you please help me giving example of a link ,i will be very thankful .Thanks again for your contribution Anand .
Regards,
Bharat
knowledge of programming. You may be better of downloading from my
online music sites like http://www.s-anand.net/hindimp3 or by
recording songs as they’re playing, as described in
http://www.s-anand.net/Recording_online_songs.html
Can you please help me ,how to download from hummaa.com
Thanks
Bharat
Not sure if I can be of any help.