Conversation
|
There's another lyrics API I found at https://lyrics.astrid.sh which finds a lot more songs so it might be better to use that instead. Only thing is I think they are scraping genius.com which is probably against their TOS. What do you think? |
|
After looking at this a bit more I think scraping genius is the way to go so I wrote some code to do that. It should be faster and more robust (better handling of parenthesis for example) than going through a 3rd party api. From my testing the accuracy is pretty good. As with any scraping though breakage could happen at any time, but if you merge this I'm willing to update the scraping code if it breaks. Something I haven't added is a feature gate (is this wanted?). Could also add an enable checkbox to preferences? edit: I also enabled the gzip feature on reqwest to reduce the size when fetching the genius html |
3ee2001 to
02a71bf
Compare
|
Hello, Thank you for your pull request! Integrating code scraping towards https://genius.com/ seems like a bad idea, this is a Cloudflare-backed HTML frontend, they may have ML heuristics that will detect the pattern of the software and eventually serve captchas/decrease the reputation of SongRec users IP addresses.
It's a small Node.js module querying https://api.genius.com/ (see https://docs.genius.com/), but it requires to manually specify an API token from the configuration (source code) |
Hello and thanks for making this awesome app!
This pull request adds display of song lyrics to the GUI below the album art. Resolves #88
Uses the (open) API from https://lrclib.net for fetching song lyrics, but it should be easy to add more/better lyrics API if they exist(?). The API is pretty good but fails sometimes on more obscure songs.