Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Parse headlines to HTML file

by Chris Micken (Initiate)
on Sep 20, 2013 at 15:11 UTC ( #1055046=perlquestion: print w/ replies, xml ) Need Help??
Chris Micken has asked for the wisdom of the Perl Monks concerning the following question:

is there a script that can import Headlines from an internet URL- parse the data so it just displays Headlines to a html page that I can then push to a few monitors? In the past we had an activeperl script that worked.

Comment on Parse headlines to HTML file
Re: Parse headlines to HTML file
by hippo (Curate) on Sep 20, 2013 at 15:34 UTC
    In the past we had an activeperl script that worked.

    Which prompts the obvious question: Why are you not still using it?

      the way the content is being delivered changed (Sat receiver) so it is not an option. now looking to get some the headlines via the web.

        So, it's really only the retrieval and parsing you are after since the rest of your old script would still apply? In which case look into LWP for the retrieval and HTML::Parser for the parsing. That should make fairly light work of it, hopefully.

Re: Parse headlines to HTML file
by Arunbear (Parson) on Sep 20, 2013 at 15:48 UTC

    By "Headlines" do you mean <h1> tags, <title> tags, or something else?

    There are a number of examples that you may be able to modify to do what you need (I have a vague memory of these being included in ActivePerl about a decade ago).
      Sorry. i mean headline news. A script that will grab some headlines every hour or so and create a clean html file or even text file.

        Are you expecting to get the news from an XML feed or by scraping an HTML page? And from which web site?

        Given the large number of ways that a news headline could be represented in terms of HTML out in the wild, it's unlikely that such a script exists (for parsing HTML at least).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1055046]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-12-21 13:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (105 votes), past polls