diff --git a/plugins/lyrics.pm b/plugins/lyrics.pm
index 32222a9f..456a627d 100644
--- a/plugins/lyrics.pm
+++ b/plugins/lyrics.pm
@@ -76,15 +76,25 @@ my %Sites= # id => [name,url,?post?,function] if the function return 1 => lyrics
return 0 if $_[0]=~m*!; # truncated lyrics : "[...]" followed by italic explanation => not auto-saved
return !!$1;
}],
- musixmatch => [musixmatch => 'https://www.musixmatch.com/lyrics/%a/%t', undef,
+ musixmatch => [musixmatch =>
sub {
- if ($_[0] =~ /(.+?)<\/span>.*/$1/s;
- $_[0] =~ s/[\r\n]/
/g;
- } else {
- $_[0] = $notfound;
- }
- }],
+ ::ReplaceFields($_[0], 'https://www.musixmatch.com/lyrics/%a/%t', sub {
+ $_[0] =~ s/ (&|\*|\-) / /gr
+ =~ s/(\'|\,|\.) / /gr
+ =~ s/\(.*?\)//gr # remove comments in parenthesis: a.e. (Extended Version), (Chillout Mix), etc
+ =~ s/^\s+|\s+$//gr
+ =~ s/\s/-/gr
+ });
+ },
+ undef,
+ sub {
+ my $text;
+ if($_[0] =~ /"body":"(.*?)","/){
+ $text = $1 =~ s|\\n|
|gr =~ s|\\(["'])|$1|gr;
+ }
+ $_[0] = $text || $notfound;
+ return !!$text;
+ }],
#lyricwikiapi => [lyricwiki => 'http://lyricwiki.org/api.php?artist=%a&song=%t&fmt=html',undef,
# sub { $_[0]!~m#\W*Not found\W*
#s }],
#azlyrics => [ azlyrics => 'http://search.azlyrics.com/cgi-bin/azseek.cgi?q="%a"+"%t"'],