Skip to content

Update WebClient.cs#6

Open
Thlayli wants to merge 1 commit intombfrankz:masterfrom
Thlayli:patch-1
Open

Update WebClient.cs#6
Thlayli wants to merge 1 commit intombfrankz:masterfrom
Thlayli:patch-1

Conversation

@Thlayli
Copy link
Copy Markdown

@Thlayli Thlayli commented Mar 25, 2021

I believe I found the cause of the Musixmatch provider saying "lyrics found" but then returning an empty result. You referenced it in this thread: https://getmusicbee.com/forum/index.php?topic=25406.msg185630#msg185630

It seems Musixmatch is not including any of the normal character set information in the header, and so the ENCODING_REGEX match is failing. I think leads to an uncaught error on line 259.

I added a pattern to the end of ENCODING_REGEX intended to match data-react-helmet charset used on Musixmatch. I do not currently have the ability to compile and test this change, but I hope this suggestion is helpful.

Added experimental pattern to the end of ENCODING_REGEX intended to match data-react-helmet charset used on Musixmatch.
@Thlayli
Copy link
Copy Markdown
Author

Thlayli commented Apr 9, 2021

I managed to install msbuild and compile this change (with YamlDotNet.11.1.0, NUnit.3.13.1, and, ILMerge.3.0.41) and it succeeded and works fine.

However, I realize now that Musixmatch has bot detection, so the issue is probably from the captcha page and not a failure due to charset detection. The added regex makes it more robust, but doesn't seem to fix the provider completely and may be unnecessary.

@pschichtel
Copy link
Copy Markdown

The change is still valid though, but the regex is more specific then it needs to be. The data-react attribute is not necessary and should not be required here

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.

2 participants