Boah, une version perl qui devrait etre "reliable" comme disent les Anglophones 😉
Copier coller dans un term :
cat>~/chuck-news.pl<<'EOF'
#!/usr/bin/env perl
# ------------------------------------------------------------------
# made by sputnick in da FreAkY lApPy lAb (c) 2009
# gilles.quenot <AT> gmail <DOT> com
# ------------------------------------------------------------------
# ,,_
# o" )@
# ''''
# ------------------------------------------------------------------
#
use strict;
use warnings;
use HTML::TreeBuilder;
use WWW::Mechanize;
my $m = WWW::Mechanize->new;
$m->agent_alias( 'Linux Mozilla' );
$m->get('http://www.chucknorrisfacts.fr/index.php?p=parcourir&tri=aleatoire');
my $tree = HTML::TreeBuilder->new_from_content( $m->content )->look_down("_tag", "div", "class", "fact");
my $a = $tree->{_parent}{_content}[0]{_content}[1]{_parent} = $tree->{_parent}{_content}[2];
print $a->as_text,$/;
$tree = $tree->delete;
EOF
chmod +x ~/chuck-news.pl
echo $'\n~/chuck-news.pl' >> ~/.bashrc
Puis ouvrir un nouveau term 😉