Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added method to fetch lyrics from AZLyrics or Genius as a fallback #1251

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from

Conversation

Spectre-hidN
Copy link

Spotify's official lyrics for many songs are not available for non-premium users. So, both synced and unsynced lyrics tabs will throw an error. But, now, it will fetch the unsynced lyrics of the currently playing track from Azlyrics as a fallback.
It uses the raw lyrics from the website, with no formatting or cleanups. So, for that reason, some non-UTF characters will break when it is rendered on the lyrics tab.

Helps to fetch lyrics from azlyrics website
Spotify lyrics for many songs are not available for non-premium users. Now, it will fetch unsynced lyrics from Azlyrics as a fallback.
@Spectre-hidN Spectre-hidN changed the base branch from master to dev February 21, 2024 20:49
Now it will adapt to dynamic changes in the URL parameters. Additionally, it will remove extra spaces from the beginning of the lyrics.
@KRTirtho KRTirtho self-requested a review February 24, 2024 14:48
@KRTirtho
Copy link
Owner

Also, results are not that great. Hardly shows up for tracks except US/UK/ES one's
I think genius.com has a wider collection of lyrics, so implementing it instead of AZLyrics should provide much better results

@Spectre-hidN
Copy link
Author

Spectre-hidN commented Feb 24, 2024

Also, results are not that great. Hardly shows up for tracks except US/UK/ES one's
I think genius.com has a wider collection of lyrics, so implementing it instead of AZLyrics should provide much better results

Genius requires an access token to use its official API. Also, the results are not always correct when using its API to search for a song (for example, FE!N by Travis Scott), and it might hit Error 429 if a user requests too many times. So, scraping the lyrics from a website is a better way to fetch the lyrics. I'll try my luck scraping the website if that doesn't violate their TOS.

This way, users don't require genius API access tokens.
Now, it will fetch lyrics from genius.com if they're not found on AZLyrics.
@Spectre-hidN Spectre-hidN changed the title Added method to fetch lyrics from AZLyrics as a fallback Added method to fetch lyrics from AZLyrics or Genius as a fallback Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants