I’m working on a Perl script in AWS EC2 to take the telnet output, match club call signs, and then post member spots to our Discord channel. However, since it’s in development I apparently made too many connects and got blacklisted. Is there a development telnet server that is available that doesn’t blacklist as quickly?
Why wouldn’t you just use the HTTP API?
Because I already have a Perl script that connects to RBN Telnet servers and it’s much less work to throw this together as a quick and dirty kludge until I have time to work on something more robust.
That’s as good a reason as any I suppose
No, there isn’t a dev telnet server. But something like:
use LWP::Simple;
use JSON::Parse;
my $spots = parse_json(get('https://api2.sota.org.uk/api/spots/25'));
should be sufficient to get you an array of the last 25 spots. Each spot has an ID, so you can track duplicates against that. I think it’d be unlikely to have more than 25 spots in any given minute, assuming you trigger your check once a minute.
Well, I stand corrected (since 2018):
SpotDate | cnt |
---|---|
2020-09-18 08:39 | 47 |
2020-09-18 08:40 | 36 |
2020-07-26 06:15 | 33 |
2020-09-18 08:38 | 31 |
2020-09-13 01:49 | 29 |
2020-10-10 08:22 | 18 |
2020-09-17 06:39 | 17 |
2021-01-12 05:32 | 17 |
2020-07-19 11:48 | 16 |
2020-11-22 08:54 | 14 |
I plan on eventually using that since it gives a LOT more information. I just need to sit down and work on a quick and dirty routine to massage the array data.