Scanner Alerts


Tower

I built a automatic bot to check RadioReference.com for active alerts on the live scanner audio feeds.

You can get instant alerts from this bot on Twitter by following @ScannerAlerts


How it works:

  1. The program is set to run aromatically every 2 min.
  2. It will check RadioReference.com to see if there are any live feeds in alert status.
  3. If there are no alerts, it will stop and wait for the next check in 2 min.
  4. If there are active alerts, it will grab the Name of the feed,  Text from the alert status and also the time. It will do this for up to 5 feeds (at this time).
  5. The program will take the time and convert it into a basic number. ie 4:36 is now 436 and 12:15 is now 1215.
  6. It will then take the highest number (time) and use that as the most recent feed. There is a known bug around 11:00 and 12:00 am/pm because RadioReference doesnt define AM/PM in the time, so there the program sees 11:15am as more recent than say 1:36pm. Without doing a lot more scripting, there is no “easy” way around this.
  7. After gathering the most recent feed time, it will take that feed Name and Alert description and will shorten some of the text.
    Police = PD,  Fire = FD,  County = Co
    This is to allow more content do be displayed due to Twitter’s 140 character limit.
  8. It will combine the feed name and alert status and then shorten it to 121 characters. Then it will add on the link to the page to listen to the live feeds. This link is 19 characters long. 121 (info) + 19 (link) = 140 characters total.
  9. Then once it has been formatted, it will use REST to post to the twitter account.

I know there are a few paid services out there, but this one is free, automated and you also get to listen to the LIVE audio, instead of just getting a text alert on your phone or pager.

I hope you enjoy the twitter bot!


Get Adobe Flash player