python-pandora icon indicating copy to clipboard operation
python-pandora copied to clipboard

Pandora ads

Open Gh0stWires opened this issue 11 years ago • 11 comments

I was testing out my program to see if it truly has no limits when it comes to skipping songs. after awhile of clicking skip, ads started to play(even though its programmed to ignore ad tokens), instead of what it told me it was supposed to be playing. is there a reason why it's doing this? and is there a way around it?

Gh0stWires avatar Feb 01 '14 21:02 Gh0stWires

What it seems to be doing is sending a url that is an ad where the music url should be.

Gh0stWires avatar Feb 16 '14 02:02 Gh0stWires

Limiting the number of allowed skips is one of Pandoras main points for limiting the free account, so one should be careful when circumventing that. In that context I am also hesitant to make to many guesses, but would recommend to buy a Pandora One subscription if you really aim for unlimited skipping. Sorry..

02strich avatar Feb 16 '14 11:02 02strich

Then how does pithos do it?

Gh0stWires avatar Feb 16 '14 15:02 Gh0stWires

What exactly?

02strich avatar Feb 16 '14 16:02 02strich

There is a program called pithos on linux. its written in python. It has no ads and unlimited skipping and never seems to run into a problem.http://pithos.github.io/

Gh0stWires avatar Feb 16 '14 17:02 Gh0stWires

I am well aware of Pithos (the code of python-pandora is originally inspired by it) and I think you got me slightly wrong: I am hessitant to support ad-free playing in the library because there were repercussion (mainy changing the API to make it deliberately complicated) in early days of Pandora against libraries that allowed this. So its not a technical thing, but more a social one.

Nevertheless having had a look at the Pithos logic, they are simply looking at the playtime:

if dur_int < 45.0: # Less than 45 seconds we assume it's an ad
    logging.info('Ad detected!')
    self.current_song.is_ad = True

You could use the same logic in your app, as this will work well for mainstream music.

02strich avatar Feb 16 '14 18:02 02strich

I understand why your hesitant. I realize pandora would change there stuff if you could exploit it, because they'd loose money. The application I'm making wont be mass distributed i just made it to see if i could sort of like a technical challenge. I'm not in it to screw over pandora. also that logic from pithos is interesting i wish i thought of it.

Gh0stWires avatar Feb 16 '14 21:02 Gh0stWires

Expected so, but wanted to explain the background first :) also had the same reaction, when seeing their code...

02strich avatar Feb 16 '14 21:02 02strich

yeah I understand. While this thread is open can I ask, is the add_feedback function for thumbs up...and what does add seed do?

Gh0stWires avatar Feb 16 '14 21:02 Gh0stWires

add_feedback is for thumbs up and add_seed adds a musician or similar to a station

02strich avatar Feb 16 '14 21:02 02strich

Oh I didn't even know that was a feature of pandora lol

Gh0stWires avatar Feb 16 '14 21:02 Gh0stWires