summaryrefslogtreecommitdiffstats
path: root/get-arch-keys.pl
blob: b7ee42ddd6bd3e9ffec583585b6db9e2ed01ca0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl
use warnings;
use strict;
use JSON;
use WWW::Mechanize;
use v5.10;

my $url = 'https://www.archlinux.org/master-keys/json/';

my $mech = WWW::Mechanize->new(cookie_jar => {});

$mech->get($url);
my $json = JSON::decode_json($mech->content());
for my $node (@{$json->{nodes}}) {
	say $node->{key} if $node->{group} eq "packager" and $node->{key};
}