DingleBerries Posted April 12, 2009 Posted April 12, 2009 I am working on a linux application for pandora, and since I havent seen the decompile flash around here it is; http://rapidshare.com/files/220552130/tuner_8_8_0_1_pandora.flr Its not a full dump as of yet. EDIT. I think I found what I was looking for. HTTPMonitor . Quote
Pichet Posted April 12, 2009 Posted April 12, 2009 I've been waiting for something like this to happen since a couple years, litterally. A few more months would be worth it should there be a Linux LiveCD in the end!!! I am working on a linux application for pandora, and since I havent seen the decompile flash around here it is; http://rapidshare.com/files/220552130/tuner_8_8_0_1_pandora.flr Its not a full dump as of yet. EDIT. I think I found what I was looking for. HTTPMonitor . Quote
DingleBerries Posted April 12, 2009 Author Posted April 12, 2009 I havent really done much yet, just looking at how things work. I have a pretty good way of downloading all the songs via python... but finding the name and renaming the song is an issue atm. UPDATE: atm I am using Portable FireFox(For linux) and a nice python http monitoring server, httpMonitor. The reason I chose to use portable FireFox is because the connection settings have to be edited in order to use the httpMonitor proxy. Basically its just a bash script that runs ff, turns on the server and waits for a certain url. Until I can figure out naming of the songs I am a bit stuck. EDIT I am now using this: http://www.okisoft.co.jp/esc/python/proxy/ Its a local proxy that is really great for monitoring http headers. Pretty much I am going to grab anything that looks like http://audio-sjl-t*-*.pandora.com/access/?version=*&lid=* Quote
ZigZagJoe Posted April 13, 2009 Posted April 13, 2009 http://*pandora.com/*xmlrpc*fragment* xml data which contains song metadata. The url used to request the songs is within; You'll need to use that to match audio metadata with the actual song data. http://*pandora.com/*xmlrpc*getstations* station names paired with keys, xml format. the station key is contained in the song metadata ("stationId" key in song data) http://*pandora.com/*xmlrpc*addfeedback* feedback from client. Arg7 in the request url denotes wither it was thumbs up or down; true or false. Arg2 is song id (field "musicId" in metadata) http://*pandora.com/*tuner_warn* errors that the client encountered, not really useful insofar as saving music goes, but a good thing to log. http://audio*pandora.com/*token=* song data, in HE-AAC or MP3 format. MP3 for any flash version older than 9r115, otherwise aacPlus NOTE: all urls have been converted to lowercase. Go to http://mpeg4ip.sourceforge.net/ to get the (linux, windows port available) utility mp4tags, which can be used to tag the HE-AAC files that pandora sends to clients. I don't have any samples of the XML data (the bits that parse that in PS have been done for a long time) but that should be enough to get your started. You will want to check that the response code is 200 before trying to parse the xml data, sometimes Pandora servers make a poo and sent a 404 or other error page, and the XML parser will hairball. I should setup a linux virtual machine again, and see if SProxy + Pandorasaver can work properly with wine. (or however you run C# progs on linux...mono, perhaps.) Quote
Xqtftqx Posted April 13, 2009 Posted April 13, 2009 Grabbing the songs is alot easier by just copying the file from the /tmp folder. There mp4 files labeled Flash*. Just an alternative method though. Quote
DingleBerries Posted April 13, 2009 Author Posted April 13, 2009 Thank you ZigZagJoe and Xqtftqx. I think your way is alot easier Xqtftqx, so I will be doing that instead of a portable firefox. So now the plan is to copy songs from /tmp, grab xml data, use python xml phaser to add the meta data... wow that was made things 10x easier. So this is what I have so far. (Ubuntu 8.10) 1. Clear /tmp files 2. Copy /tmp files to ~/Desktop/PandoraRipper/Music #!/bin/bash while [ 1 ] do   cp -p -b /tmp/Flash* ~/Desktop/PandoraRipper/Music done 3. Put this script in the Music directory #!/bin/bash rm Flash*~ for f in Flash*; do mv $f `basename $f `.m4a; done; This is just for now, until I can find away of not using a proxy with ff. Next step will be automating Picard(DIRECT DOWNLOAD) to tag the m4a files and using something like Prism to launch pandora. Quote
ZigZagJoe Posted April 13, 2009 Posted April 13, 2009 You'll need to use a proxy regardless; you need to read the XML data pandora sends the flash (which is not saved to tmp or otherwise, iirc, and you can't duplicate the request); and it is a more durable way to get the music anyways. Quote
DingleBerries Posted April 15, 2009 Author Posted April 15, 2009 I have been playing with a few proxies here and there, and have found some that used to work but now do not. I have to put this project on the backburner for now but if any one decides to pick it up let me know and I will help any way i know how. Until then VM+Windows+ZigZagJoes application is the best. Quote
Zimmer Posted April 16, 2009 Posted April 16, 2009 ZigZagJoe I have ran Pandora with wireshark running and the aac files can not be download because of a 403 forbidden error and the tmp files are either a) locked up because of firefox or B) gone, deleted after playing NO time to copy the file before deleted. Quote
ZigZagJoe Posted April 16, 2009 Posted April 16, 2009 ZigZagJoe I have ran Pandora with wireshark running and the aac files can not be download because of a 403 forbidden error and the tmp files are either a) locked up because of firefox or B) gone, deleted after playing NO time to copy the file before deleted. Yes, so you must save the response that the flash gets (that is how PS works, on windows). On linux atleast they can't lock the file like is done on windows. (linux victor) Quote
Zimmer Posted April 17, 2009 Posted April 17, 2009 Yes, so you must save the response that the flash gets (that is how PS works, on windows). On linux atleast they can't lock the file like is done on windows. (linux victor) But I can't save it because it is deleted RIGHT after play no time to copy it... so I tried to get the URL but that gives a forbidden request (so how did the pandora player get it...) Quote
ZigZagJoe Posted April 17, 2009 Posted April 17, 2009 But I can't save it because it is deleted RIGHT after play no time to copy it... so I tried to get the URL but that gives a forbidden request (so how did the pandora player get it...) What i meant was, when that request goes through the proxy, when the proxy has completed downloading it from server and is preparing to send it to client (flash player), it has to get saved there (from the response in memory). This is the only way to do so. Also, the pandora player receives XML data which tells it the next 4 songs that will play, those songs' metadata, and the URL which is used to retrieve them. Quote
Zimmer Posted April 17, 2009 Posted April 17, 2009 ok thanks, shame to use proxy :(... Wait if proxy can request than either a there is away around it or it is only one request allowed or only a specific time period hmmm... Quote
ZigZagJoe Posted April 17, 2009 Posted April 17, 2009 ok thanks, shame to use proxy :(... Wait if proxy can request than either a there is away around it or it is only one request allowed or only a specific time period hmmm... No. The flash applet is requesting THROUGH the proxy - a separate request is not made. I imagine it checks the user-agent. Quote
Zimmer Posted July 3, 2009 Posted July 3, 2009 Well I have been looking at pandora (and a way to get the files directly no proxy) and I have found that the addon DownloadHelper (firefox) detects media (flvs) and at the end of each song (so far the first and second audio) it gives a url that contains the next audio (even though it ends in .flv) and it is plable using vlc directly (even after the song and it is a diffrent url for each audio) also DownloadHelper always detects several other flvs but these always have the title of the page (so Pandora Radio Listen to Free Internet Radio, Find New Music). Enjoy Quote
Zimmer Posted July 3, 2009 Posted July 3, 2009 After a couple hours of being off of pandora (had to kill firefox and qt (Memory usage out of control http://img191.imageshack.us/img191/1129/ri...moryusage.jpg)) and the url's I had from DownloadHelper still work they also all start with http://audio-sjl-t1-2.pandora.com/access/?...6648&token= and what token = is always 87 characters also the token is the same for two urls then changes for the next two so on (I can NOT identify a pattern). Also from what I can find pandora does not use a user agent for the songs (the ones here and the one that are accessible once, because I used the iTunes Store User Agent (before I was doing some xml stuff with the iTMS)). Also DingleBerries have you gotten any progress (also care to explain python httpMonitor)? Quote
ZigZagJoe Posted July 3, 2009 Posted July 3, 2009 Yes, those are the mp4s. Which are somewhat useless (to me) if they have no tags (which is why you have to sniff the metadata). There is only one token per unique song. Sounds like downloadhelper is listening em twice. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.