in reply to Converting HTML to RSS

Here is what I have in the perl script.

http://www.exwebjunkie.com/testperl.txt

It create's the .rss file, but it just contains the following:

<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/"> <channel> <title>cpfc.org</title> <link>http://www.cpfc.org/</link> <description>cpfc.org - news links.</description> </channel> </rdf:RDF>
So it seems that it is not finding the articles or converting them..

update (broquaint): added formatting

Replies are listed 'Best First'.
Re: Re: Converting HTML to RSS
by Tomte (Priest) on Feb 17, 2003 at 15:15 UTC

    The URL you're fetching the content from returns a big java-script if I open it in mozilla or wget.
    I don't think LWP::Simple interpretes js, correct me if I'm wrong, and just disregard this message if I'm saying something stupid.

    The rest of the script contains errors I'm sure of you can spot 'em all by yourself, if your looking long enough. (using $headline as an undefined variable for example, not looping in some way over the content, etc.).



    Update:Maybe you shouldn't use HTML::TokeParser but try to manufacture a regexp and parse the content by yourself
    something like m!<a href="([a-zA-Z0-9/?&=]+)">([^<]+)!, which will most likely capture you the url and the title if slightly modified.

    regards,
    tomte