Support WOTA alerts, need to see a spot before we can support spots properly. #63

This commit is contained in:
Ian Renton
2025-10-23 08:15:16 +01:00
parent 229228d209
commit 5093a8d3d1
2 changed files with 82 additions and 0 deletions

23
spotproviders/wota.py Normal file
View File

@@ -0,0 +1,23 @@
import re
from rss_parser import RSSParser
from spotproviders.http_spot_provider import HTTPSpotProvider
# Spot provider for Wainwrights on the Air
class WOTA(HTTPSpotProvider):
POLL_INTERVAL_SEC = 120
SPOTS_URL = "https://www.wota.org.uk/spots_rss.php"
def __init__(self, provider_config):
super().__init__(provider_config, self.SPOTS_URL, self.POLL_INTERVAL_SEC)
def http_response_to_spots(self, http_response):
new_spots = []
rss = RSSParser.parse(http_response.content.decode())
# Iterate through source data
for source_alert in rss.channel.items:
break
# TODO: Need to see a live spot to know what this feed looks like
return new_spots