blob: 0e9f0411ba1502cf6f9ee83d184bc935b126cb14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent ();
my $ua = LWP::UserAgent->new(timeout => 10);
$ua->ssl_opts(verify_hostname => 0);
$ua->env_proxy;
$ua->agent('');
my $u = 'https://netsplit.de/channels/details.php?room=%23perl&net=Libera.Chat';
my $r = $ua->get($u);
my $i = '/tmp/channels/irc-stats-7842-45163956.png';
my $d = '#perl Libera.Chat - Graph about the amount of users during the last weeks';
$r->decoded_content =~ m{<img border="0" src="(/tmp/channels/[^"<>]*?\.png)" alt="([^"<>]*?)"} if $r->is_success;
$i = $1 if $1;
$d = $2 if $2;
print <<HTML;
<a href="$u"><img border="0" src="https://netsplit.de$i" alt="$d"/></a>
HTML
|