ttyは明日ミマス。
typester++
sub handle {
my ($self, $url) = @_;
$url =~ qr!http://ttyshare.com/rec/\w+!;
}
sub find {
my($self, $args) = @_;
my $uri = $args->{url};
my $response = LWP::UserAgent->new->post(
$uri,
['download' => 1]);
if($response->content =~ m/<div id="p-(.+?)" class="player">/) {
my $enclosure = Plagger::Enclosure->new;
$uri = sprintf('http://ttyshare.com/static/tty/%s/%s/%s/%s',
substr($1, 0, 1), substr($1, 0, 2), substr($1, 0, 4), $1);
$enclosure->url($uri);
$enclosure->type('application/x-ttyrec');
$enclosure->filename("$1.tty");
return $enclosure;
}
return;
}