Finish support for WOTA #63

This commit is contained in:
Ian Renton
2025-10-25 09:37:41 +01:00
parent e31c750b41
commit 3625998f46
2 changed files with 56 additions and 17 deletions

View File

@@ -1,4 +1,3 @@
import re
from datetime import datetime
import pytz
@@ -23,6 +22,11 @@ class WOTA(HTTPAlertProvider):
rss = RSSParser.parse(http_response.content.decode())
# Iterate through source data
for source_alert in rss.channel.items:
# Reject GUID missing or zero
if not source_alert.guid or not source_alert.guid.content or source_alert.guid.content == "http://www.wota.org.uk/alerts/0":
continue
# Pick apart the title
title_split = source_alert.title.split(" on ")
dx_call = title_split[0]