mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Fix multi callsign alerts from NG3K #38
This commit is contained in:
@@ -53,14 +53,13 @@ class NG3K(HTTPAlertProvider):
|
||||
|
||||
# Sometimes the DX callsign is "real", sometimes you just get a prefix with the real working callsigns being
|
||||
# provided in the "by" field. e.g. call="JW", by="By LA7XK as JW7XK, LA6VM as JW6VM, LA9DL as JW9DL". So
|
||||
# if there are "as" callsigns in the "by" field, we extract them and replace the main call with them.
|
||||
# TODO this doesn't work yet, debug
|
||||
# if there are "as" callsigns in the "by" field, we extract them and use them, otherwise we fall back to the
|
||||
# "real" call field.
|
||||
extra_parts = parts[5].split("; ")
|
||||
by = extra_parts[0]
|
||||
dx_calls = [parts[2].upper()]
|
||||
match = self.AS_CALL_PATTERN.match(by)
|
||||
if match:
|
||||
dx_calls = [x.group(1) for x in re.finditer(self.AS_CALL_PATTERN, by)]
|
||||
dx_calls = [x.group(1) for x in re.finditer(self.AS_CALL_PATTERN, by)]
|
||||
if not dx_calls:
|
||||
dx_calls = [parts[2].upper()]
|
||||
|
||||
dx_country = parts[1]
|
||||
qsl_info = parts[3]
|
||||
|
||||
Reference in New Issue
Block a user