Mail::Pyzor::Digest::StripHtml
my $stripped = Mail::Pyzor::Digest::StripHtml::strip($html);
This module attempts to duplicate pyzor’s HTML-stripping logic.
This library cannot achieve 100%, bug-for-bug parity with pyzor because to do so would require duplicating Python’s own HTML parsing library. Since that library’s output has changed over time, and those changes in turn affect pyzor, it’s literally impossible to arrive at a single, fully-compatible reimplementation.
That said, all known divergences between pyzor and this library involve invalid HTML as input.
Please open bug reports for any divergences you identify, particularly if the input is valid HTML.
Give it some HTML, and it’ll give back the stripped text.
In general, the stripping consists of removing tags as well as <script> and <style> elements; however, it also removes HTML entities.
<script>
<style>
This tries very hard to duplicate pyzor’s behavior with invalid HTML.
To install Mail::Pyzor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::Pyzor
CPAN shell
perl -MCPAN -e shell install Mail::Pyzor
For more information on module installation, please visit the detailed CPAN module installation guide.