use strict; use warnings; use HTML::Parse; use HTML::FormatText; use LWP::Simple; my $url = "http://perlmonks.org/?displaytype=print;node_id=752400"; my $html = get($url); defined $html or die "Can't fetch HTML from: ",$url; my $ascii = HTML::FormatText->new->format(parse_html($html)); print $ascii; __END__ #### Tricking website into thinking your a browser by Anonymous Monk on Mar 22, 2009 at 16:13 UTC (replies) http://perlmonks.com?node_id=752400 Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: Hi, use strict; use warnings; use HTML::Parse; use HTML::FormatText; use LWP::Simple; my $url = "http://www.perlmonks.org"; my $html = get($url); defined $html or die "Can't fetch HTML from: ",$url; my $ascii = HTML::FormatText->new->format(parse_html($html)); print $ascii; This code doesn't give me the text that I see with my browser. How do I do this? Thanks! Back to Seekers of Perl Wisdom #### $ pmvers HTML::Parse HTML::FormatText LWP::Simple HTML::Parse: 2.71 HTML::FormatText: 2.04 LWP::Simple: 5.810