No announcement yet.

[VB.NET] Updated CNN Breaking News

  • Filter
  • Time
  • Show
Clear All
new posts

  • [VB.NET] Updated CNN Breaking News

    This is an update (v3.4) to the CNN Breaking News script that has been around here on the boards since sometime in 2001. The main credit for this effort go to th the original authors, "xplosiv" (Dan) and "paugusto" (Paul Augusto). The main changes from their last release:
    1. Translation from VBScript to mostly pure VB.NET
    2. Attempts to avoid repeating the same news
    3. Replaced use of hs.GetUrl() with .NET HttpWebRequest
    4. Allow for no argument to Main() script routine
    Instructions are in the comments at the top of the file.

    The changes in v3.4 (26-May-2010):
    1. Took out some leftover stuff I had put in for my own LED-sign stuff.
    2. Changed the news extraction to simply strip out all the HTML.

    Post any issues or requests in the discussion thread:

    Attached Files
    Last edited by stevea; May 28th, 2010, 02:10 PM. Reason: updated to v3.4

  • #2
    I posted an update to fix a few minor items, and provide some more useful instructions. The update is in the first message in this thread. As usual, post any questions or issues in the discussion thread.



    • #3
      v3.4 posted

      The first message in this thread has been updated with v3.4 of the Custom_CNN VB.NET script. Although I only changed a couple of things, most people will find this is a dramatic change in use: It will report MANY more breaking news alerts.

      In trying to track down some problems in the script, I put in some debug, creating a file of data scraped from each time an alert was detected (just the relevant section of the page). I ran it for an entire day, and found that over 70 files were created, even though not a single breaking news announcement was made! I started looking at each file, and each one did indeed have a legit breaking news story (although only three unique ones for that day).

      In examining the code and each of these files, I found that although the code went through lots of effort to find and extract the news item, it just couldn't handle every case. So I tried a simple approach, and simply stripped out all the HTML. To my amazement, it left only the exact text that I would want to put in the breaking news announcement!

      I've run it for a few days now, and Pete has run it for a bit less. It seems to work pretty well, and consistently. I'm certain people will not be missing any breaking news items now. I'll leave it to each of you to decide if that is a good thing or a bad thing....



      • #4
        It's been pointed out that I neglected to include a icon that was referenced in the default config file: thumbs_up.gif. This was actually meant as a placeholder / example, but I should have included the one I was using. It's attached in the ZIP. Just put it in html\snevl.

        Attached Files