Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: I want to save web pages as text rather than as HTML.

by anautismobserver (Sexton)
on Sep 06, 2019 at 22:14 UTC ( #11105752=note: print w/replies, xml ) Need Help??


in reply to Re: I want to save web pages as text rather than as HTML.
in thread I want to save web pages as text rather than as HTML.

I apologize for my ignorance.

When I try to run the first "self-contained example" as written in the provided link, it produces no output (except for "Press any key to continue...").

When I replace the body of the script (starting with "my $re ="...) with the next code example (that uses "HTML::TokeParser::Simple;"), I get the error message "Can't locate HTML::TokeParser::Simple.pm in @INC"

Could you please give me a code example that truly is self-contained, that reads (and parses) an HTML file and outputs it as a text file?

Thank you.

  • Comment on Re^2: I want to save web pages as text rather than as HTML.

Replies are listed 'Best First'.
Re^3: I want to save web pages as text rather than as HTML.
by Anonymous Monk on Sep 07, 2019 at 01:30 UTC

    Could you please give me a code example that truly is self-contained, that reads (and parses) an HTML file and outputs it as a text file?

    Sure, go fish, strip HTML tags

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11105752]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2020-01-28 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?