gsteph / groove-dl

A Grooveshark song downloader in Python
http://gsteph.github.io/groove-dl/
120 stars 30 forks source link

Rewrite protocol #11

Open DelusionalLogic opened 12 years ago

DelusionalLogic commented 12 years ago

Type: Improvement

I might have found a site where the protocol is easier to understand.

Tinysong.com

It's run by grooveshark, and it runs the request right over the client, so we can see what is necessary to not get banned, right now it seems like the missing piece to not get banned is "markSongQueueSongPlayed", i am currently rewriting the whole groove.py to be more like a library, and will add this.

gsteph commented 12 years ago

I wanted to do that but I never knew exactly how to (I've never actually looked at a python module/library) so I ended up with groove.py Mind posting your code when you're done ?

DelusionalLogic commented 12 years ago

Of course, i learned python like 2 weeks ago, so it might not be completely optimized. all it really is is adding self as the first param of all methods, wrapping it all in a class and prefixing self. all functioncalls and global variable calls inside of the class

gsteph commented 12 years ago

Ah great. I never bothered to learn about classes. I can take care of the little optimizations/cosmetics.

DelusionalLogic commented 12 years ago

I did switch to urllib2 instead of httplib, simply because i think grooveshark would be happier if we stored the phpsessid. so i used cookiejar :D

gsteph commented 12 years ago

Alright, not sure why I used httplib in the first place xD

DelusionalLogic commented 12 years ago

Sadly that didn't fix it. I'm going to do some comparisons in ubuntu between the script and the browser to see what's so different.

EDIT: did some tests on some proxies, and it's great, i managed to get rid of wget (in favor of my own downloader) that even supports callbacks, so you can post process updates yourself now :D