[perl]代码库
#-----------------------------
$ascii = `lynx -dump $filename`;
#-----------------------------
use HTML::FormatText;
use HTML::Parse;
$html = parse_htmlfile ( $filename );
$formatter = HTML::FormatText->new ( leftmargin => 0, rightmargin => 50 );
$ascii = $formatter->format ( $html );
#-----------------------------
use HTML::TreeBuilder;
use HTML::FormatText;
$html = HTML::TreeBuilder->new();
$html->parse ( $document );
$formatter = HTML::FormatText->new ( leftmargin => 0, rightmargin => 50 );
$ascii = $formatter->format ( $html );
#-----------------------------
by: 发表于:2017-09-18 17:49:51 顶(0) | 踩(0) 回复
??
回复评论