Open nutritiousreject opened 7 years ago
Hi there! Lyrics are actually fetched from a brazilian website: http://vagalume.com.br. Probably just they don't have your songs in their database.
Yeah that's what i figured. I know rapgenius forsure has a public API,pretty sure a few other services do. I need to do some more research to find as many as I can to try and close that gap
I'll probably add the functionality myself to scan multiple services until the song is found.
If you find some good and free service, I'll add them to my project! Anyway, PRs are welcome, of course ;)
http://www.cajunlyrics.com/?page=api _ I know spotify was using https://www.musixmatch.com/ but they ditched it for whatever reason. They seem to have a public API also , but im sure they're not 100% free . http://lyrics.wikia.com/wiki/Lyrics_Wiki
I also noted that you can use the wikia API to access lyrics from. I couldn't find any good documentation on that, but it's a defiant possibility
I'm checking these sites.
Musixmatch actually provides a beta access (with limited access) for their API, they will become paid soon or later
Mmm, using lyrics.wikia.com may be an option, but not a 100% legit and legal one, for sure :/
http://lyrics.wikia.com/api.php?artist=Cake&song=Dime&fmt=realjson
Parameters:
artist - Artist's name
song - Song name
albumName - Album name
albumYear - Four-digit album year
fmt - Response format
func - Query type
limit - Max number of items to return (eg: in getTopSongs)
Example:
api.php?action=lyrics&artist=Joe%20Bonamassa&song=So%20Many%20Roads&fmt=xml&func=getSong
It seems to allow public API requests of songs
http://api.wikia.com/wiki/LyricWiki_API brings you to http://api.wikia.com/wiki/LyricWiki_API/Support_Matrix which brings you to http://lyrics.wikia.com/api.php?artist=Cake&song=Dime&fmt=realjson
They defiantly don't make it clear to find
I didn't actually test the api to see if it's down though. If that's the case, I might look into doing some wget magic and just avoiding the law all together
api is definantly active, however they seem to not give the entire lyrics to the song.
I wonder it'd be possible to use the API to get the url of the song and just parse the html element out. Doesn't seem impossible expecially since it's all contained neatly in a div with a class
Yes, you just defined a scraper :D I found some packages on npm, but I didn't try to see if their database is really that larger than vagalume's.
http://lyrics.wikia.com/wiki/Special:Statistics
They have listed 1,852,928 songs apparently.
So like probably. It'd make community support of adding custom lyrics pretty easy too
If scraping doesn't work, theres also the possibility of just displaying the DIV with the lyrics in an iframe too
I tried like 15 songs and nothing happened.
I noticed you were using vagalume as your lyric providing service. I'll look into adding multiple lyric serving sites later on tonight.
the ability to add lyrics to a song for others from inside the app wouldn't be a bad idea either