0

Display RSS info other than Title and Description

I am trying to display the <link> text to a Title and Description of an RSS in a ticker.  So that it displays the url of the article for everyone to see.  I tried modifying the rsstitle.brs parser but it did not work.  

I want to display on the ticker the text between the <link> url</link>.

 

Here is an example of the RSS feed

<item>
<title>Massive male great white shark tagged and released off Florida coast (13 feet 9 inches) (Live Science)</title>
<description>
<![CDATA[ Massive male great white shark tagged and released off Florida coast (13 feet 9 inches) (Live Science) ]]>
</description>
<pubDate>Fri, 14 Feb 2025 14:48:50 -0500</pubDate>
<guid isPermaLink="false">46DB40C4-E010-4B1A-96DD-1F05709A9F9C</guid>
 
</item>

Any help would be appreciated.

5 comments

  • 0
    Avatar
    Bright Scripters

    Wouldn't QR code be more effective?

  • -1
    Avatar
    Anthony Snukis

    It would but I am displaying the rss feed on a scrolling LED ticker .  I just want to display the Title and the website <link> it sites on the ticker. I have had no luck modifying the parsing script plugin "rsstitle.brs" to display the <link>

  • 0
    Avatar
    Edwin

    You're on the right track trying to modify the RSS parser for your ticker. The challenge is extracting the text content between the <link> tags and incorporating it into the ticker's display. Here's a breakdown of how you can approach this, along with considerations for different programming environments:

    Understanding the Problem

    XML Parsing: RSS feeds are XML documents. You need to parse the XML structure to find the <link> elements.
    Text Extraction: Once you find a <link> element, you need to extract the text content (the URL) within it.
    Ticker Integration: You need to modify your ticker's data source or parsing logic to include the extracted URL along with the title and description.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Tiktok Video Downloader By SnapTik

  • 0
    Avatar
    Anthony Snukis

    Edwin,

    Thanks for the insight.  I am having trouble getting the <link> text to display even after I modify the parser script.

    Here is what I have.  And it still display the Title of the item not the link text.

    Sub rsstitle(xmlFileName$ as String, itemsByIndex as object, itemsByTitle as Object, userVariables As Object)
     
    xml = CreateObject("roXMLElement")
    if not xml.Parse(ReadAsciiFile(xmlFileName$)) then 
    print "xml read failed"
    else
    if type(xml.channel.link) = "roXMLList" then
    index% = 0
    for each itemXML in xml.channel.link
    itemsByIndex.push(itemXML.link.GetText())
     
    index% = index%+1
    next
    endif
    endif
     
    DeleteFile(xmlfilename$)
    end Sub

     

  • 0
    Avatar
    Bright Scripters

    Debugging a parser is easier when executed in isolation instead of in BrightAuthor.

    Something like:

     

    sub main()
     rsstitle(...)
    end sub


    Sub rsstitle(...)
    ...
    end sub

    Name the file test.brs and run it from the BrightSign shell with

    BrightSign> script test.brs

     

    Should you still need further assistance, you could drop us a line at info@brightscripters.com

Please sign in to leave a comment.