Hello,
I try to update lyrics.pm
I should replace the escape in title by a "-" to work.
Could you help me ? (I don't know _[0] etc...)
I try to update lyrics.pm
I should replace the escape in title by a "-" to work.
Could you help me ? (I don't know _[0] etc...)
Code Select
genius => [genius => sub { ::ReplaceFields($_[0], "https://genius.com/%a-%t-lyrics", sub { my $s=::url_escapeall($_[0]); $s=~s/%20/-/g; $s }) }, undef,
sub {
if ($_[0] =~ m/<span class="lyrics__content__\w+">/) {
$_[0] =~ s/.*<span class="lyrics__content__\w+">(.+?)<\/span>.*/$1/s;
$_[0] =~ s/[\r\n]/<br>/g;
return 1;
} else {
$_[0] = $notfound;
return 0;
}
}],