Answer the question
In order to leave comments, you need to log in
How to set up parsing of an html page in Perl?
Hello.
Please tell me how to parse the following from the page www.efremova.info/word/slovar.html :
Книга, содержащая перечень слов, их частей или словосочетаний с пояснениями, толкованиями или с переводом на другой язык.
Thank you very much, kind people.
Answer the question
In order to leave comments, you need to log in
#!/usr/bin/env perl
use Mojo::Base -strict;
use Mojo::UserAgent;
my $uri = 'http://efremova.info/word/slovar.html';
my $sel = 'td#centerCnt ol li';
my $ua = Mojo::UserAgent->new();
my $text = $ua->get($uri)->res->dom->at($sel)->text;
There is also an excellent parser metacpan.org/module/Web ::Scraper
I really enjoyed working with it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question