Well, do you know Pandora uses flash? if you open their web in your browser then your system is going to cry! and if you have less resource memory & CPU like then you won’t like flash in your browser.
There are more issues, like the web plays adds and audio has low bit-rate i.e., low quality. If you need high quality music i.e., 190 kbps and without any adds then you need a subsription.
But you can luckly get rid of adds and get high bit-rate audio via Pandora API. Here comes Pianobar, a free command line based client that does all you need.
Again, I followed few blogs to get it running, few of them are here; Instructables,
sudo apt-get install pianobar
Easier way is to use either MacPorts or Homebrew. To install via MacPorts to the following
sudo port install pianobar
I’ll guide you to use Homebrew. first install Homebrew source
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
brew install pianobar
If you get error on the above installation then may be the link is dead and you need to get the updated URL. People also use different way to install them, here is another way. source
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local
Compile manually; first install depenties and then Pianobar according to this soruce
sudo port install libao faad2 libmad cmake git-core
git clone git://github.com/PromyLOPh/pianobar.git
cmake . && make && sudo make install
Now you can launch Pianobar with
It’ll ask you to enter user name and password, following station name, like below
Welcome to pianobar! Press ? for a list of commands.
(i) Login… Ok.
(i) Get stations… Ok.
0) some name Radio
1) some name Radio
2) some name Radio
3) some name Radio
[?] Select station:
After the login you can press
? to view the action keys, like pressing
n can choose next song.
We can configure Pianobar with user name and password in a text file where we could also specify to use proxy and even more. By default Pianobar will look for a configuration file under
~/.config/pianobar/config, so all we have to do is to create a config file in that location.
.config under your home directory like below if you don’t have one.
mkdir -p ~/.config/pianobar
Let’s add some details to the
tls_fingerprint = 2D0AFDAFA16F4B5C0A43F3CB1D4752F9535507C0
user = firstname.lastname@example.org
password = mypassword
At this moment I don’t have more details on tls_fingerprint, but may be in future I’ll have some.
If you run
pianobar on your terminal, it’s going login automatically, wow! that’s nice. Still we can do more here, let’s move on further.
Run under Proxy
If you are located outside of US then you want to use free/paid proxy server to get access to Pandora, look at my previous post deals with free proxie servers. Remember that Pianobar can handle http proxy but not the SOCKS.
Add the following at the bottem of your
control_proxy = http://xxx.xxx.xxx.xxx:80
xxx.xxx.xxx.xxx with the IP your found on free proxy sites and also the port number
80. Now you should able to use Pianobar from outside of US.
Ok, that looks fine, but hey! don’t you think it’s silly to edit
config file on every launch?, yes it’s. There is work around for this, you can configure
tor to automatically pickup the proxy.
tor look at my earlier post, if you run it then you’ll see something like below on ~5-th line;
[notice] Opening Socks listener on 127.0.0.1:9050
So you could cofigure your Pianobar to listen to port
9050, you may expect it’s all done, but it’s not going to work because
tor works on SOCKS and Pianobar doesn’t handle SOCKS and required http proxy. So what we are going to do? there are scripts around which does listen to SOCKS and forwards it to http proxy. It was very hard for me to get one working. I was trying pianobarproxy, delegate, Polipo and few more. None of them worked initially but I found a working method with Polipo and I’ll explain you here. It’s taken from different resources found here and in superuser.Install Polipo from Homebrew.
brew install Polipo
Now we need to configure Polipo to listen to tor’s port 9050 and forward it to localhost. Create a text file anywhere with the following info,
socksParentProxy = 127.0.0.1:9050
Now we can tell Polipo to use this configuration file as belwo.
polipo -c ~/Downloads/config.txt
sudo mkdir polipo
sudo touch config
sudo nano config
In nano editor copy and the paste the follwing and press
socksParentProxy = 127.0.0.1:9050
Remember that Polipo default listening port is
8123 and we have add this port to Pianobar
config file. Add this info.
control_proxy = http://127.0.0.1:8123
We all done, open three tabs on terminal, on one type
tor, in the next one type the above Polipo command and in the last tab type
pianobar, you must see Pianobar running.