diff options
author | John Ankarström <john@ankarstrom.se> | 2021-05-06 18:21:15 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-05-06 18:21:15 +0200 |
commit | df484fd9b6640639c3a6098814b41628d02e5d54 (patch) | |
tree | bad0c9b4f01d383059937a95cabd48d6ed544473 /run/irc | |
parent | 65f946b63b4786170702097288aa1c84bd8e8fa1 (diff) | |
download | perlisdead-df484fd9b6640639c3a6098814b41628d02e5d54.tar.gz |
Add perlmonks, irc nodes
Diffstat (limited to 'run/irc')
-rw-r--r-- | run/irc | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use LWP::UserAgent (); + +my $ua = LWP::UserAgent->new(timeout => 5); +$ua->ssl_opts(verify_hostname => 0); +$ua->env_proxy; +$ua->agent(''); + +my $a = 'https://netsplit.de/channels/details.php?room=%23perl&net=freenode'; +my $r = $ua->get($a); +die $r->status_line if not $r->is_success; + +if ($r->decoded_content =~ m{<img border="0" src="(/tmp/channels/.*?\.png)" alt="(.*?)"}) { + print <<HTML; +<a href="$a"><img border="0" src="https://netsplit.de$1" alt="$2"/></a> +HTML +} |