HTML::Extract is a {Perl module for getting text and HTML snippets out of HTML pages.}

WWW: https://metacpan.org/pod/HTML::Extract
