groove-dl icon indicating copy to clipboard operation
groove-dl copied to clipboard

Rewrite protocol

Open DelusionalLogic opened this issue 12 years ago • 6 comments

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.

DelusionalLogic avatar Jun 18 '12 20:06 DelusionalLogic

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 ?

gsteph avatar Jun 18 '12 20:06 gsteph

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

DelusionalLogic avatar Jun 18 '12 20:06 DelusionalLogic

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

gsteph avatar Jun 18 '12 20:06 gsteph

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

DelusionalLogic avatar Jun 18 '12 20:06 DelusionalLogic

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

gsteph avatar Jun 18 '12 20:06 gsteph

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

DelusionalLogic avatar Jun 19 '12 00:06 DelusionalLogic