Perl module to get all pages of a website?

Is there a module that can give me links to all the pages that are on the website?

Why do I need this: I want to scan some sites and search for tags in them, searching only on the main page is not enough.

Thank,

+3
source share
4 answers

HTML :: SimpleLinkExtor is a bit simpler than HTML :: LinkExtor . You can check out my half try in my web tool , which has some code that you probably need.

+5
source

Perl WWW:: Mechanize, , . , , follow_link() get() .

+5
+2

- HTML:: TreeBuilder HTML . , , , , . HTML:: Element, .

:

use HTML::TreeBuilder;
use LWP::Simple;

my $url  = 'http://www.example.com/';
my $html = HTML::TreeBuilder->new_from_content(get($url));

my @links = $html->look_down('_tag'   => 'a');

, LWP:: Simple HTML:: TreeBuilder Ubuntu.

+1
source

Source: https://habr.com/ru/post/1763490/


All Articles