gsteph / groove-dl Goto Github PK
View Code? Open in Web Editor NEWA Grooveshark song downloader in Python
Home Page: http://gsteph.github.io/groove-dl/
A Grooveshark song downloader in Python
Home Page: http://gsteph.github.io/groove-dl/
I have i problem if i active more then one downloads at once that some downloads doesn't finish, they hang. It would be useful if one could limit (in the code) a download to only one active per download.
if you pass more than one word via command line without quotes just the first param is used ("python groove.py foo bar" will only search for foo
may change a few lines like this:
print entrystring
init()
getToken()
m = 0
input = " ".join(sys.argv[1:])
s = getResultsFromSearch(input)
cheers
Currently, Groove-DL has no license, which means it's fully copyrighted. Have you considered adding a license (like the GPL or the BSD-type)?
Hello!
I use Manjaro, which is based on Arch Linux, and I do not know how to install, since there are only instructions for Debian, Red Hat and derivatives on the site. I have already installed the the latest version of "wxgtk", "setuptools" and the python of course (came already installed), but still got no success when running "sudo python setup.py install" command inside the folder "ObjectListView". Could anyone help me?
Hugs!
On windows we do not have wget. It would be more useful to have a custom downloader so that the script can be run without OLV on windows. I know you have precompiled it but if someone wants to learn he will run the python script directly and will surely encounter an error. What do you say ? @jacktheripper51
The grooveshark servers return with an outdated client message, and doesn't return the result. updating the client value breaks the token.
I was definitely not expecting to see 4+ attempts to install bloatware/malware/spyware in the installer. That's a huge turnoff on an open source project like this.
Executing grrove-dl I get this error:
Initializing...
Traceback (most recent call last):
File "/usr/share/groove-dl/groove.py", line 195, in
getToken() #Get a static token
File "/usr/share/groove-dl/groove.py", line 64, in getToken
_token = json.JSONDecoder().decode(gzip.GzipFile(fileobj=(StringIO.StringIO(conn.getresponse().read()))).read())["result"]
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
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.
the script doesn't work in germany since the gema (representative of music publishers) forced to shut down grooveshark here
good news: everythink works fine if you catch the cookie via proxy (like firefox plugin "grooveshark unlocker")
simply change a few lines:
# SETTINGS
PROXY = False
HOST = example.com
PORT = 1234
# ...
def init():
if PROXY:
conn = httplib.HTTPConnection(HOST, PORT)
conn.set_tunnel("grooveshark.com")
conn.connect()
else:
conn = httplib.HTTPConnection("grooveshark.com")
# ...
cheers
Distro: Arch Linux
Python version: python2.7
I do:
python2 groove.py "a"
error:
A Grooveshark song downloader in python
by George Stephanos [email protected]
Initializing...
Searching for 'a'...
Traceback (most recent call last):
File "groove.py", line 206, in
print '\n'.join(l) #Print the results
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 264: ordinal not in range(128)
The last release was 2 years ago. Since then a lot has changed. Why not do a new release ?
WHen you enter a music title to search, the music id's (1 in this case) are shifted, ie I had to enter '0' to get the 1st result
1: "Syndicate - Nero Remix" by "Skrillex & Nero" (Syndicate)
Enter the Song ID you wish to download or (q) to exit: 1
Traceback (most recent call last):
File "./python/groove.py", line 136, in
stream = getStreamKeyFromSongIDEx(s[songid]["SongID"])
IndexError: list index out of range
Doesn't seem like the version installed via pip works, but the version at HEAD works great. Any chance we can get that updated?
I've installed this (v0.97.8
as the title says) via arch linux AUR (Version 57.b712ee9-1
) and use the GUI.
Whenever I start to download multiple files with the same name + artist at the same time (select all of them, right click, download) they somehow get mixed up into the same file instead of suffixed with (#).
Otherwise nice project ๐
PS: I'm your 100th:star2: :smile:
There is an issue on line 223, specifically https://github.com/jacktheripper51/groove-dl/blob/master/python/groove.py#L223
if s[songid]["ArtistName"] contains a "/", (such as the band AC/DC), then the file cannot be saved since wget will report an error "No such file or directory"
I worked around this issue by first importing re, then changing cmd to
cmd = 'wget --post-data=streamKey=%s -O "%s - %s.mp3" "http://%s/stream.php"' % (stream["streamKey"], re.sub(r'+|/+', '', s[songid]["ArtistName"]), re.sub(r'+|/+', '', s[songid]["SongName"]), stream["ip"]) #Run wget to download the song
Traceback (most recent call last):
File "", line 1, in
File "", line 3, in get_me
File "groove.py", line 64, in getToken
_token = json.JSONDecoder().decode(gzip.GzipFile(fileobj=(StringIO.StringIO(conn.getresponse().read()))).read())["result"]
I got this error today while using groove-dl. I hope that you can fix this error.
Sometimes, when I try to listen I get this error:
Retrieving stream key..
Failed
After some hours, it works. I use it a couple of times and then I get the same error.
The script is never able to get a stream key after the switch to getStreamKey...
It always return empty, and the program therefore exits. I can access grooveshark in browser, just not in script. (search and everything works fine, just not StreakKey
diff --git a/python/groove.py b/python/groove.py
index 039bb1e..ae3c5e0 100755
--- a/python/groove.py
+++ b/python/groove.py
@@ -135,6 +135,7 @@ if name == "main":
if songid == "" or songid == "q": exit()
songid = eval(songid)
stream = getStreamKeyFromSongIDEx(s[songid]["SongID"])
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.