Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: How can I download HTML and save it as txt?

by ikegami (Patriarch)
on Aug 30, 2005 at 21:23 UTC ( [id://487949]=note: print w/replies, xml ) Need Help??


in reply to How can I download HTML and save it as txt?

I have problems understanding your question, but at least one of the following modules should help you.

Any of LWP::Simple, LWP::UserAgent and WWW::Mechanize will help you download a web page.

As for converting the HTML to text, HTML::FormatText and possibly HTML::FormatText::WithLinks should be of interest.

Update: I see others have already posted answers. InfiniteSilence posted an example of downloading a web page and saving it as HTML in a file with the extention .txt. jeffa posted an example of converting HTML to text. Pick and choose what you want.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-19 14:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found