Jump to content

Zimmer

Dedicated Members
  • Posts

    670
  • Joined

  • Last visited

Everything posted by Zimmer

  1. Pichet what are you talking about yourself in 3rd person ()
  2. Ok I will post them... Also are you referencing ZigZagJoe's apps, because he put a lot of work into them and he also helped me a lot so don't discredit his work :( Also have you tried mono? FYI You need httplib2 (see the second post for instructions...) Front End http://download476.mediafire.com/9la1acsh9...+Grooveshark.py Back End http://download862.mediafire.com/b5az0cvus.../Grooveshark.py
  3. Fixed that and a JSON Error (Same Error) EXE link http://download781.mediafire.com/vt151bb5t...rooveshark3.exe
  4. Fixed Sorry about the errors... URL is http://download734.mediafire.com/rmhbuo2hl...rk2+Updated.exe
  5. fixing right now... also I am almost done with the new gui
  6. Well I am working on a pandora client written in python, so if I ever get to that, it will easily run on linux. That is if I get to it (I plan way to many apps and never have enough time to do them :()
  7. I am currently updating the gui (to an actual gui) and fixing some of the backcode... hopefully will have it up tonight
  8. MERGED WITH TOP POST ---- Old Post Bellow for referance How to run from python source ok there is a little problem with getting the exe so for know you need save the front end code with any name then save the backend code with the name Grooveshark.py to the same directory python from python.org/download -WINDOWS http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi -MAC http://www.python.org/ftp/python/2.6.4/pyt..._macosx10.3.dmg -LINUX If not already installed or version not working get it through package manager (probably called python or python2.6 or some variant) Note: Mac OS X and most linux distros already have python just type python then the file with the fronted code at the terminal and httplib2 which can be downloaded from http://httplib2.googlecode.com/files/httplib2-0.5.0.zip --unzip -- go into directory and run python setup.py build then setup.py install Then to run python (path and file of front end code) in the terminal
  9. FOR EDUCATIONAL USE ONLY DOES NOT WORK, I AM WORKING HARD ON A NEW VERSION, ALSO THANK GROOVESHARK FOR THIS NOT ME, THEY CHANGED THE API, (enough screaming :)) Write now you can search, download and change save location... For the gui there is no EXE link (if you want one I can upload one just ask.) Python Link Instructions 1. Download 2. Double Click the file and unzip 3. Run Grooveshark Gui.py 4. Enjoy and please report any errors Python Files Instructions 1. Download http://download830.mediafire.com/9swx9hdam.../Grooveshark.7z 2. Extract 3. Open a terminal and navigate to the extract folder 4. Run python "Grooveshark.py" Thank Yous -Psychosis for helping me find errors in the application and reporting them :-) -ZigZagJoe for his work in PandoraSaver2 (a great app!) and his help and inspiration :-) How to run from python source 1. Download http://download830.mediafire.com/9swx9hdam.../Grooveshark.7z 2. Extract 3. Install Python (step 4 bellow) 4. Install httplib2 (step 5 bellow) 5. Install wxPython from wxpython.org/download.php 6. Open a terminal and navigate to the extract folder 7. Run python "Grooveshark Gui.py" Current Source Code (Old Code below in Old Versions Section) http://download838.mediafire.com/l5m1wleem...distrobution.7z Old Versions URL was http://download774.mediafire.com/azdy55ssd...jnywno/dist.exe Source: http://download830.mediafire.com/9swx9hdam...eshark.7z"]http://download830.mediafire.com/9swx9hdam.../Grooveshark.7z URL was http://download781.mediafire.com/vt151bb5t...rooveshark3.exe ---------Fixes in version 0.4---------- 1. JSON/ HTTP Request Error --Front End-- #!/usr/bin/python import time import sys import os from Grooveshark import Grooveshark #instance of Grooveshark g = Grooveshark() class Menu(object): def __init__(self, path): self.path = path print 'Getting Session Data' g.sessionData() print '''\ WARNING THIS IS AN ALPHA VERSION EXPECT LOTS OF ERRORS AND PROBLEMS IF YOU DO CHOOSE TO USE THIS\n\n --------------------------------- Welcome to Grooveshark Explorer''' def MainMenu(self): print '''\n MAIN MENU\n ---------------------------\n Please pick what you want to do: 1) Search for a song - Option to Download 2) See top 100 songs on Grooveshark 3) Change Save Location (Right now it is %s) 4) Exit .........................................''' % self.path choice = '0000' choice = raw_input(':') if len(choice) < 1: self.MainMenu() elif choice[0].lower() == '1': search_string = '' search_string = raw_input('Search for: ') search_string = search_string.replace('"', '') try: g.search(search_string) except: print 'There was an error with you search... sorry' print g.response o = open('C://loggrooveshark.txt', 'wb') o.write(g.result) o.close() self.MainMenu() #Display Search Reults if len(g.searchResults) > 0: print '====Song Names====' for n,i in enumerate(g.searchResults): try: print '%i.\t%s' % (n+1, i['Name']) except UnicodeEncodeError: print '%i.\t%s' % (n+1, repr(i['Name'])[2:-1]) else: print 'No Songs Found' self.MainMenu() #Ask Which Song to Select selection = 'default' selection = raw_input('Which Song to select (Menu to go back to Menu) : ') if selection.lower() == 'menu': self.MainMenu() print 'You chose %s ' % selection songName = g.searchResults[int(selection)-1]['Name'] songID = g.searchResults[int(selection)-1]['SongID'] g.songKeyfromID(songID) print 'Downloading Song... This may take long but it is working' print 'Once the song is done downloading... You will see "Writing to file." There will not be a progress bar during download, sorry :(' g.downloadSong() print 'Writing to file...' songFile = open(self.path+songName+'.mp3', 'wb') songFile.write(g.song) songFile.close() writeCheck = open(self.path+songName+'.mp3', 'rb') write = writeCheck.read() writeCheck.close() print 'Returns True if write was succesful... ' + str(write == g.song) print 'Saved Song located at %s' % self.path+songName+'.mp3' self.MainMenu() elif choice[0].lower() == '2': print 'Not Implemented' time.sleep(1) self.MainMenu() elif choice[0].lower() == '3': print 'Change Save Location, Need Full self.path' print 'I think MacOSX/Linux Work, BUT I AM NOT SURE (Please report your findings :))' print '' self.path = raw_input('New self.path: ') if not os.path.exists(self.path): print 'Error Bad self.path' self.path = 'C:/' self.MainMenu() else: self.path = self.path.replace('\\', '/') if not self.path[-1] == '/': self.path = self.path + '/' print 'self.path Changed' print 'self.path is %s' % self.path self.MainMenu() elif choice[0].lower() == '4': print 'Exiting...' time.sleep(1) sys.exit() else: print 'Invalid Choice!' self.MainMenu() def legal_warning(): print 'LOADING...' print '>>>' print 'THIS APPLICATION DOES NOT COME WITH ANY WARRANT, WHATSOEVER. THIS APPLICATION DOES NOT MAKE ANY WARRANTY ABOUT THE USEFULLNESS OR WORKING ORDER OF THIS APPLICATION THIS IS NOT TO DOWNLOAD COPYRIGHT WORKS... THIS APPLICATION IS STRICKLY MEANT ONLY FOR TIMESHIFTING PURPOSES! IN SOME COUNTRIES THIS APPLICATION MAY BE ILLEGAL, IF YOU ARE UNSURE CONTACT LEGAL ADVICE. NEITHER THE AUTHOR OR ANY OTHER PARTY RELATED TO THIS APPLICATION IS RESPONSIBLE FOR YOU MISUSE AND/OR ILLEGAL USEAGE!' print '' if not raw_input('Do you agree? y/n ')[0].lower() == 'y': sys.exit() if __name__ == '__main__': legal_warning() m = Menu('C:/') m.MainMenu() --Back End-- import time import sys import uuid import hashlib import urllib try: import json except ImportError: print 'JSON import failed' try: import simplejson as json except ImportError: print 'Can not import simplejson... CLOSING' time.sleep(3) sys.exit() #Third Pary Libaries import BeautifulSoup import httplib2#Need version 5 or higher for python 2.6 compatability #This is a default header that can be used if you just need a user agent change (this way not every function/method has to define this) header = {} header['user-agent'] = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)' class Grooveshark(object): def __init__(self): self.search_url = 'http://cowbell.grooveshark.com/more.php?getSearchResults' def search(self, search_string): http = httplib2.Http() data = ('''{"header":{"session":"%s","uuid":"%s","client":"gslite","clientRevision":"20091027.09","token":"%s"},''' '''"parameters":{"type":"Songs","query":"%s"},"method":"getSearchResults"}''' % (self.session, self.uuid, self.token, search_string.lower())) self.response, self.result = http.request(self.search_url, 'POST', headers = header, body = data) self.result = self.result self.searchResults = json.loads(self.result)['result']['Return'] return self.searchResults def sessionData(self): self.session = self.getSessionID() self.uuid = self.getUID() self.token = self.getToken() def songKeyfromID(self, id): http = httplib2.Http() self.songID = id songKeyURL = ' http://cowbell.grooveshark.com/more.php?ge...FromSongID' songKeyPOSTdata = ('''{"header":{"token":"%s","session":"%s","uuid":"%s","client":"gslite","clientRevision":"20091027.09"},''' '''"parameters":{"songID":%s,"prefetch":false},"method":"getStreamKeyFromSongID"}''' % (self.token, self.session, self.uuid, self.songID)) request, reply = http.request(songKeyURL, 'POST', headers = header, body = songKeyPOSTdata) self.reply = json.loads(reply)['result'] self.songKey = self.reply['result']['streamKey'] return self.songKey def downloadSong(self): http = httplib2.Http() self.mp3URL = 'http://'+self.reply['result']['streamServer']+'/stream.php'#use self. so that any outer program can access it (not local) data = {} data['streamKey'] = self.songKeyfromID(self.songID) songHeader = header songHeader['content-length'] = str(len(urllib.urlencode(data))) songHeader['content-type'] = 'application/x-www-form-urlencoded' self.response, self.song = http.request(self.mp3URL, 'POST', headers = header, body = urllib.urlencode(data)) return self.song def getToken(self): http = httplib2.Http() url = 'https://cowbell.grooveshark.com/service.php' self.secretKey = hashlib.md5(self.session).hexdigest() tokenPOSTdata = ('''{"header":{"session":"%s","uuid":"%s","client":"gslite","clientRevision":"20091027.09"},''' '''"parameters":{"secretKey":"%s"},"method":"getCommunicationToken"}''' % (self.session, self.uuid, self.secretKey)) request, reply = http.request(url, 'POST', headers = header, body = tokenPOSTdata) return json.loads(reply)['result'] def getUID(self): return uuid.uuid4() def getSessionID(self): http = httplib2.Http() url = 'http://listen.grooveshark.com' response, src = http.request(url, 'GET', headers = header) src = src.lower().replace(' ', '') start = src.find('session') end = src[start:].find("',") startSession = src[start:end+start].find("'") +1 return src[startSession+start:end+start] URL was http://download734.mediafire.com/rmhbuo2hl...rk2+Updated.exe Version 0.2 and 0.3 (See Minor Code Changes) Minor Code Changes Note on the line bellow search_string = raw_input('Search For:') I added search_string = search_string.replace('"', '') to fix a minor problem.... I felt this fix did not deserve a addition to old code and a full change (though the EXE has been updated) 1. Do note that before this error was fixed the url was EXE URL Front End #!/usr/bin/python import time import sys import os from Grooveshark import Grooveshark #instance of Grooveshark g = Grooveshark() class Menu(object): def __init__(self, path): self.path = path print 'Getting Session Data' g.sessionData() print '''\ WARNING THIS IS AN ALPHA VERSION EXPECT LOTS OF ERRORS AND PROBLEMS IF YOU DO CHOOSE TO USE THIS\n\n --------------------------------- Welcome to Grooveshark Explorer''' def MainMenu(self): print '''\n MAIN MENU\n ---------------------------\n Please pick what you want to do: 1) Search for a song - Option to Download 2) See top 100 songs on Grooveshark 3) Change Save Location (Right now it is %s) 4) Exit .........................................''' % self.path choice = '0000' choice = raw_input(':') if len(choice) < 1: self.MainMenu() elif choice[0].lower() == '1': search_string = '' search_string = raw_input('Search for: ') g.search(search_string) #Display Search Reults if len(g.searchResults) > 0: print '====Song Names====' for n,i in enumerate(g.searchResults): try: print '%i.\t%s' % (n+1, i['Name']) except UnicodeEncodeError: print '%i.\t%s' % (n+1, repr(i['Name'])[2:-1]) else: print 'No Songs Found' self.MainMenu() #Ask Which Song to Select selection = 'default' selection = raw_input('Which Song to select (Menu to go back to Menu) : ') if selection.lower() == 'menu': self.MainMenu() print 'You chose %s ' % selection songName = g.searchResults[int(selection[0])-1]['Name'] songID = g.searchResults[int(selection[0])-1]['SongID'] g.songKeyfromID(songID) print 'Downloading Song... This may take long but it is working' print 'Once the song is done downloading... You will see "Writing to file." There will not be a progress bar during download, sorry :(' g.downloadSong() print 'Writing to file...' songFile = open(self.path+songName+'.mp3', 'wb') songFile.write(g.song) songFile.close() writeCheck = open(self.path+songName+'.mp3', 'rb') write = writeCheck.read() print 'Returns True if write was succesful... ' + str(write == g.song) print 'Saved Song located at %s' % self.path+songName+'.mp3' self.MainMenu() elif choice[0].lower() == '2': print 'Not Implemented' time.sleep(1) self.MainMenu() elif choice[0].lower() == '3': print 'Change Save Location, Need Full self.path' print 'I think MacOSX/Linux Work, BUT I AM NOT SURE (Please report your findings :))' print '' self.path = raw_input('New self.path: ') if not os.path.exists(self.path): print 'Error Bad self.path' self.path = 'C:/' self.MainMenu() else: self.path = self.path.replace('\\', '/') if not self.path[-1] == '/': self.path = self.path + '/' print 'self.path Changed' print 'self.path is %s' % self.path self.MainMenu() elif choice[0].lower() == '4': print 'Exiting...' time.sleep(1) sys.exit() else: print 'Invalid Choice!' self.MainMenu() def legal_warning(): print 'LOADING...' print '>>>' print 'THIS APPLICATION DOES NOT COME WITH ANY WARRANT, WHATSOEVER. THIS APPLICATION DOES NOT MAKE ANY WARRANTY ABOUT THE USEFULLNESS OR WORKING ORDER OF THIS APPLICATION THIS IS NOT TO DOWNLOAD COPYRIGHT WORKS... THIS APPLICATION IS STRICKLY MEANT ONLY FOR TIMESHIFTING PURPOSES! IN SOME COUNTRIES THIS APPLICATION MAY BE ILLEGAL, IF YOU ARE UNSURE CONTACT LEGAL ADVICE. NEITHER THE AUTHOR OR ANY OTHER PARTY RELATED TO THIS APPLICATION IS RESPONSIBLE FOR YOU MISUSE AND/OR ILLEGAL USEAGE!' print '' if not raw_input('Do you agree? y/n ')[0].lower() == 'y': sys.exit() if __name__ == '__main__': legal_warning() m = Menu('C:/') m.MainMenu() Back End import time import sys import uuid import hashlib import urllib try: import json except ImportError: print 'JSON import failed' try: import simplejson as json except ImportError: print 'Can not import simplejson... CLOSING' time.sleep(3) sys.exit() #Third Pary Libaries import BeautifulSoup import httplib2#Need version 5 or higher for python 2.6 compatability #This is a default header that can be used if you just need a user agent change (this way not every function/method has to define this) header = {} header['user-agent'] = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)' class Grooveshark(object): def __init__(self): self.search_url = 'http://cowbell.grooveshark.com/more.php?getSearchResults' def search(self, search_string): http = httplib2.Http() data = ('''{"header":{"session":"%s","uuid":"%s","client":"gslite","clientRevision":"20091027.09","token":"%s"},''' '''"parameters":{"type":"Songs","query":"%s"},"method":"getSearchResults"}''' % (self.session, self.uuid, self.token, search_string.lower())) response, result = http.request(self.search_url, 'POST', headers = header, body = data) self.searchResults = json.loads(result)['result']['Return'] return self.searchResults def sessionData(self): self.session = self.getSessionID() self.uuid = self.getUID() self.token = self.getToken() def songKeyfromID(self, id): http = httplib2.Http() self.songID = id songKeyURL = ' http://cowbell.grooveshark.com/more.php?ge...FromSongID' songKeyPOSTdata = ('''{"header":{"token":"%s","session":"%s","uuid":"%s","client":"gslite","clientRevision":"20091027.09"},''' '''"parameters":{"songID":%s,"prefetch":false},"method":"getStreamKeyFromSongID"}''' % (self.token, self.session, self.uuid, self.songID)) request, reply = http.request(songKeyURL, 'POST', headers = header, body = songKeyPOSTdata) self.reply = json.loads(reply)['result'] self.songKey = self.reply['result']['streamKey'] return self.songKey def downloadSong(self): http = httplib2.Http() self.mp3URL = 'http://'+self.reply['result']['streamServer']+'/stream.php'#use self. so that any outer program can access it (not local) data = {} data['streamKey'] = self.songKeyfromID(self.songID) songHeader = header songHeader['content-length'] = str(len(urllib.urlencode(data))) songHeader['content-type'] = 'application/x-www-form-urlencoded' self.response, self.song = http.request(self.mp3URL, 'POST', headers = header, body = urllib.urlencode(data)) return self.song def getToken(self): http = httplib2.Http() url = 'https://cowbell.grooveshark.com/service.php' self.secretKey = hashlib.md5(self.session).hexdigest() tokenPOSTdata = ('''{"header":{"session":"%s","uuid":"%s","client":"gslite","clientRevision":"20091027.09"},''' '''"parameters":{"secretKey":"%s"},"method":"getCommunicationToken"}''' % (self.session, self.uuid, self.secretKey)) request, reply = http.request(url, 'POST', headers = header, body = tokenPOSTdata) return json.loads(reply)['result'] def getUID(self): return uuid.uuid4() def getSessionID(self): http = httplib2.Http() url = 'http://listen.grooveshark.com' response, src = http.request(url, 'GET', headers = header) src = src.lower().replace(' ', '') start = src.find('session') end = src[start:].find("',") startSession = src[start:end+start].find("'") +1 return src[startSession+start:end+start] =============================================================== =============================================================== =============================================================== URL: http://download684.mediafire.com/bdmtqd1tn...Grooveshark.exe Version 0.1 ---Front End--- #!/usr/bin/python import time import sys import os from Grooveshark import Grooveshark #instance of Grooveshark g = Grooveshark() def MainMenu(): print 'Getting Session Data' g.sessionData() print '''\ WARNING THIS IS AN ALPHA VERSION EXPECT LOTS OF ERRORS AND PROBLEMS IF YOU DO CHOOSE TO USE THIS Welcome to Grooveshark Explorer Please pick what you want to do: 1) Search for a song - Option to Download 2) See top 100 songs on Grooveshark 3) Change Save Location (Default is C:\) 4) Exit ......................................... ''' path = 'C:/' choice = '0000' choice = raw_input(':') if choice[0].lower() == '1': search_string = raw_input('Search for: ') g.search(search_string) #Display Search Reults if len(g.searchResults) > 0: print '====Song Names====' for n,i in enumerate(g.searchResults): try: print '%i.\t%s' % (n+1, i['Name']) except UnicodeEncodeError: print '%i.\t%s' % (n+1, repr(i['Name'])[2:-1]) else: print 'No Songs Found' MainMenu() #Ask Which Song to Select selection = raw_input('Which Song to select (Menu to go back to Menu): ') if selection.lower() == 'menu': MainMenu() songName = g.searchResults[int(selection[0])-1]['Name'] songID = g.searchResults[int(selection[0])-1]['SongID'] g.songKeyfromID(songID) print 'Downloading Song... This may take long but it is working' print 'Once the song is done downloading... You will see "Writing to file." There will not be a progress bar during download, sorry :(' g.downloadSong() print 'Writing to file...' songFile = open(path+songName+'.mp3', 'wb') songFile.write(g.song) songFile.close() writeCheck = open(path+songName+'.mp3', 'rb') write = writeCheck.read() print 'Returns True if write was succesful... ' + str(write == g.song) print 'Saved Song located at %s' % path+songName+'.mp3' elif choice[0].lower() == '2': print 'Not Implemented' time.sleep(1) MainMenu() elif choice[0].lower() == '3': print 'Change Save Location, Need Full path' print 'I think MacOSX/Linux Work, BUT I AM NOT SURE (Please report your findings :))' print '' path = raw_input('New Path: ') if not os.path.exists(path): print 'Error Bad Path' path = 'C:/' else: path = path.replace('\\', '/') if not path[-1] == '/': path = path + '/' print 'Path Changed' print 'path is %s' % path MainMenu() elif choice[0].lower() == '4': print 'Exiting...' time.sleep(1) sys.exit() else: print 'Invalid Choice!' MainMenu() def legal_warning(): print 'LOADING...' print '>>>' print 'THIS APPLICATION DOES NOT COME WITH ANY WARRANT, WHATSOEVER.' print 'THIS APPLICATION DOES NOT MAKE ANY WARRANTY ABOUT THE USEFULLNESS OR WORKING ORDER OF THIS APPLICATION' print 'THIS IS NOT TO DOWNLOAD COPYRIGHT WORKS... THIS APPLICATION IS STRICKLY MEANT ONLY FOR TIMESHIFTING PURPOSES!' print 'IN SOME COUNTRIES THIS APPLICATION MAY BE ILLEGAL, IF YOU ARE UNSURE CONTACT LEGAL ADVICE.' print 'NEITHER THE AUTHOR OR ANY OTHER PARTY RELATED TO THIS APPLICATION IS RESPONSIBLE FOR YOU MISUSE AND/OR ILLEGAL USEAGE!' print '' if not raw_input('Do you agree? y/n ')[0].lower() == 'y': sys.exit() if __name__ == '__main__': legal_warning() MainMenu() ---Back end--- import time import sys import uuid import hashlib import urllib try: import json except ImportError: print 'JSON import failed' try: import simplejson as json except ImportError: print 'Can not import simplejson... CLOSING' time.sleep(3) sys.exit() #Third Pary Libaries import BeautifulSoup import httplib2#Need version 5 or higher for python 2.6 compatability #Intialize variables http = httplib2.Http() http.timeout = None #This is a default header that can be used if you just need a user agent change (this way not every function/method has to define this) header = {} header['user-agent'] = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)' class Grooveshark(object): def __init__(self): self.search_url = 'http://cowbell.grooveshark.com/more.php?getSearchResults' def search(self, search_string): data = ('''{"header":{"session":"%s","uuid":"%s","client":"gslite","clientRevision":"20091027.09","token":"%s"},''' '''"parameters":{"type":"Songs","query":"%s"},"method":"getSearchResults"}''' % (self.session, self.uuid, self.token, search_string.lower())) self.searchResponse, searchResult_ = http.request(self.search_url, 'POST', headers = header, body = data) self.searchResults = json.loads(searchResult_)['result']['Return'] def sessionData(self): self.session = self.getSessionID() self.uuid = self.getUID() self.token = self.getToken() def songKeyfromID(self, id): self.songID = id songKeyURL = ' http://cowbell.grooveshark.com/more.php?ge...FromSongID' songKeyPOSTdata = ('''{"header":{"token":"%s","session":"%s","uuid":"%s","client":"gslite","clientRevision":"20091027.09"},''' '''"parameters":{"songID":%s,"prefetch":false},"method":"getStreamKeyFromSongID"}''' % (self.token, self.session, self.uuid, self.songID)) request, reply = http.request(songKeyURL, 'POST', headers = header, body = songKeyPOSTdata) self.reply = json.loads(reply)['result'] self.songKey = self.reply['result']['streamKey'] def downloadSong(self): mp3URL = 'http://'+self.reply['result']['streamServer']+'/stream.php' print 'Downloading Song....' print mp3URL data = {} data['streamKey'] = self.songKey songHeader = header songHeader['content-length'] = str(len(urllib.urlencode(data))) songHeader['content-type'] = 'application/x-www-form-urlencoded' self.response, self.song = http.request(mp3URL, 'POST', headers = header, body = urllib.urlencode(data)) def getToken(self): url = 'https://cowbell.grooveshark.com/service.php' self.secretKey = hashlib.md5(self.session).hexdigest() tokenPOSTdata = ('''{"header":{"session":"%s","uuid":"%s","client":"gslite","clientRevision":"20091027.09"},''' '''"parameters":{"secretKey":"%s"},"method":"getCommunicationToken"}''' % (self.session, self.uuid, self.secretKey)) request, reply = http.request(url, 'POST', headers = header, body = tokenPOSTdata) return json.loads(reply)['result'] def getUID(self): return uuid.uuid4() def getSessionID(self): url = 'http://listen.grooveshark.com' response, src = http.request(url, 'GET', headers = header) src_ = src.lower().replace(' ', '') start = src_.find('session') end = src_[start:].find("',") startSession = src_[start:end+start].find("'") +1 return src_[startSession+start:end+start]
  10. Ok for the token you POST to the url https://cowbell.grooveshark.com/service.php with the data.... {"header":{"client":"gslite","session":"9f87b60d14f2522f780b6c6e1fed47f3","uuid":"497A2BAB-7D07-C43E-75C0-E6DB164B2C56","clientRevision":"20091027.09"},"parameters":{"secretKey":"e35c12b14bca85795279a56c4296eca8"},"method":"getCommunicationToken"} part of that data is the "secretKey" all that is, is the md5 hex digest of the session
  11. Ok I think I found what it uses to create the UUID. IT doesn't use anything custom (I thought they might be using it as a DRM (by only them knowing what they use to create the UUID they can only produce valid ones (or something like that... anyways))). IT uses the standard flash library... http://help.adobe.com/en_US/Flex/4.0/langr...createUID%28%29 I am not to familiar with flash so I could be wrong.
  12. for the recently played I believe it is stored in a flash cookie if you are not log in. yes it is stored in a flash cookie (.sol) the file it gslite.sol and on my computer it is located in C:\Documents and Settings\USER\Application Data\Macromedia\Flash Player\#SharedObjects\44EC748B\listen.grooveshark.com\main.swf Note main.swf is a folder name NOT a file for example here is mine when I play some songs on the poplar playlist Can't paste notepad++ seems to be the only thing on earth that doesn't terminate on nulls GURR
  13. Here is how it gets metadata for searches I searched for "If everyone cared" POST to url http://cowbell.grooveshark.com/more.php?getSearchResults Body of POST Header of POST In the return is all the metadata that you see when you run a search this is the same for the popular songs, recently listened songs etc Returns
  14. Yes but for searches and such you need the uuid for json objs (unless you are doing what you did for pandora (have them use the swf and your app grabs the mp3)). I am trying to create a standalone client.
  15. I still can't find how it gets the uuid or token in grooveshark, well I will post if I do find how it gets those. Update I am able to get everything but the UUID here is why: from: http://groups.google.com/group/json-rpc/br...96b92b3c193452c Guess the swf generates it :(
  16. Vako HAHA :) ya that and their catapult technology being far advance (reference to the Onion)
  17. Zimmer

    COFEE Leaked

    The html/xml generation imo is awesome and also I kinda like it, it is easy to set up and looks awesome and well done, I don't understand why people hate it
  18. Zimmer

    sigh

    Vako this is one of the few times I agree. This is a load of crap, and this is why I fear the public option, with private it is easy to remove crapy solutions, you don't go with them, but the goverment it is one monopoly you have to pay (or move out of country, so I guess it is not total lock in). Also what is your opinion on pre existing conditions... mine I see that it sucks and that private insurance uses it corruptly but also without it I can see no way that insurance could run successfully (no profit or profit). Why? Well as I see it if they had to except pre existing conditions then no one would buy it until they didn't need it, so there would never be people paying that where not sick (they would get it when they need it). I would love to hear your views :). Also what Kuninich says I agree with, though his solution I don't agree so much with but still well put. Also pass some legislation to limit lawyers (oh wait why would they limit their own power :))
  19. every couple of seconds it posts song ids then I assume the server looks that song id up to get the data
  20. Zimmer

    sigh

    Why congrats. 1.2 trillion dollars is ridiculous
  21. Zimmer

    sigh

    sigh http://politics.slashdot.org/story/09/11/0...ouse?art_pos=10
  22. Reminds me of a mexican radio station that had such a huge reach that it reached to the midwest (Ohio, Kentucky, Kansas, etc). It finally got shut down (or it might have had to lower the transmit power). Anyways just thought I would tell that story.
  23. Zimmer

    Arp poisoning

    I have never been able to get ettercap NG to run on Windows, when I actually start the capture it crashes :(.
  24. But with most hashes there are always collisions (because it is taking text that is bigger and making it a smaller hash). For example say there is a hash foo foo outputs a 1 char string... ok well there is only x amount of possible chars for 1 character, lets say we are using abcdefghijklmnopqrstuv as what any has consists of so for a through z we take up all possible combinations so if we input ab into hash foo there will be a collision... of course hashed strings are longer then 1 char but still same thing applies
  25. ZigZagJoe For searches it is just json... then for popluar you post to I believe GetPopular.php then it returns html, according to wireshark, (I believe it is json)... I'll post more... also if you havn't found this the mp3 is stream.php with the streamkey over http (so no rtmp or rtmpe etc)
×
×
  • Create New...