Fix regex for new site layout
[lyrics-fetcher-lyricstranslate.git] / lib / Lyrics / Fetcher / LyricsTranslate.pm
index f1ee778cc3df6a57cd1303873138f1f75016ce3a..3c1016e9e2577e2602379487b18cb15a34b8f8d5 100644 (file)
@@ -8,7 +8,7 @@ use HTML::TreeBuilder;
 use HTTP::Tiny;
 use Scalar::Util qw/looks_like_number/;
 
-our $VERSION = '0.001';
+our $VERSION = '0.002';
 our $BASE_URL = 'http://lyricstranslate.com';
 # 0 means (from) any language; the following arguments are the
 # destination language, artist, and title. The meaning of the last
@@ -42,7 +42,7 @@ sub fetch {
                return
        }
        $tree = HTML::TreeBuilder->new_from_content($response->{content});
-       my $node = $tree->look_down(class => qr/\btranslate-node-text\b/);
+       my $node = $tree->look_down(class => qr/(?<!\S)translate-node-text(?!\S)/);
        my $ltf = $node->look_down(class => qr/\bltf\b/);
        my @pars = $ltf->look_down(class => 'par');
        join "\n", map {
This page took 0.009356 seconds and 4 git commands to generate.