[WS] Genius (Lyrics)

Hello @bugzero, since yesterday the plugin doesn't work anymore.

I tried multiple titles and tried it on Windows 10, but it's always the same.

genius.com is accessible through the web browser (firefox 153.2.0esr). The links generated by the plugin (https://genius.com/Rammstein-reise-reise-lyrics in this case) are also accessible.

Could you please look into it? Thank you!

Edit: Nevermind, I was able to fix it with an LLM. The issue was that Genius swapped the attribute order in their <meta> tags. The script's regex expects content="..." to come before property="og:...". Genius reversed the order (property first, content second) at some point. And since that first regex never matches, <cover:start> never gets inserted, findinline fails, and I get <Error>.

Just added these lines under the Search optional tags comment inside Genius#Lyrics.inc:

regexpreplace "<meta\s*property=\"og:image\"\s+content=\"([^\"]+?)\"\s*\/>" "<cover:start>$1<cover:end>"
regexpreplace "<meta\s*property=\"og:title\"\s+content=\"([^\"]+?)\"\s*\/>" "<title:start>$1<title:end>"
regexpreplace "<meta\s*property=\"og:url\"\s+content=\"([^\"]+?)\"\s*\/>" "<url:start>$1<url:end>"

I'd like to upload the file directly, but this platform doesn't let me upload it, telling me:

Sorry, the file you are trying to upload is not authorized (authorized extensions: jpg, jpeg, png, gif, src, mte, mta, log, dmp, zip, rar, pdf, txt, rtf, mov, mp4).

1 Like