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

add azlyrics to lyrics plugin #3380

Closed
wants to merge 2 commits into from
Closed

add azlyrics to lyrics plugin #3380

wants to merge 2 commits into from

Conversation

matlads
Copy link
Contributor

@matlads matlads commented Sep 30, 2019

Add azlyrics as a source backend for lyrics

Add azlyrics as a source backend for lyrics
@matlads matlads changed the title add azlyrics add azlyrics to lyrics plugin Sep 30, 2019
@sampsyo
Copy link
Member

sampsyo commented Sep 30, 2019

Nice; looks good! I think Travis is complaining about a too-long line, which includes that HTML comment. Any chance there's a shorter way to match on that? Otherwise, you can pull it out into a multi-line string literal constant.

Also, would you mind adding a quick entry to the changelog about your addition?

@Moonbase59
Copy link

Moonbase59 commented Sep 30, 2019

Did you try some more exotic artists and titles? I think maybe they might need some conversion, don’t know how much beets would do beforehand.

Take "AC/DC" with "Thunderstruck" (→ "acdc", "thunderstruck").
AZLyrics URI: https://www.azlyrics.com/lyrics/acdc/thunderstruck.html

Or "Arkona" ("Аркона") with the song "Слово"?

@jackwilsdon
Copy link
Member

It seems in certain cases that azlyrics switches to using IDs instead (see https://www.azlyrics.com/lyrics/hatters/810433.html) - I'm not sure how much we can do here except possibly look into using their search feature?

It seems like removing all non alphanumeric characters is the safest bet in regards to things such as "AC/DC".

@Moonbase59
Copy link

Moonbase59 commented Oct 1, 2019

See https://www.azlyrics.com/lyrics/massiv/ichhabemeinetraumewahrgemacht.html ("Ich Habe Meine Träume Wahr Gemacht"), or https://www.azlyrics.com/lyrics/zaz/jaimenouveau.html ("J'aime à nouveau").

Looks like they somehow ASCII-fy, transform to lower case and remove special characters, reverting to IDs for non-ASCII languages. Without knowing their code, probably not easy to hack.

@sampsyo
Copy link
Member

sampsyo commented Oct 1, 2019

Indeed—this is sort of a cross-cutting concern across all the lyrics backends. See also #3340. Because it will never be possible to do this perfectly, I think it's fine to merge this as is (pending a line-length fix and a changelog entry) and incrementally improve the heuristic in the future.

@jtpavlock
Copy link
Contributor

Is there evidence this provides any worthwhile additions to the current lyrics sources?

@jtpavlock
Copy link
Contributor

A non-ideal solution could be to lookup the artist's page using the first letter of their (sorted) name and then using azlyric's alphabetized pages e.g. https://www.azlyrics.com/a.html for all artists starting the "A". Scrape the page for the matching artist, follow the link, then scrape that page for the matching song, follow the link, then finally scrape the lyrics.

@stale
Copy link

stale bot commented Nov 18, 2020

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 18, 2020
@stale stale bot closed this Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants