find ./ -type d -empty -print0 | xargs -t -r -0 rm -r

# --------------------------------------------------------------------
sub blog_get_title
{
    local ($html) = @_;
    my $title;

    my $p = HTML::TokeParser->new(\$html);
    # タイトル取得 div class entry_title
    while (my $token = $p->get_tag("div")) {
        $token->[1]{class} eq 'entry_title' and do {
            return $p->get_trimmed_text("/div");
        }
    }

#-- 0.8.21   blogタイトル取得 YouTube Playlist に対応
    my $p = HTML::TokeParser->new(\$html);
# YouTube Playlist
#	<html>
#	<body onload="performOnLoadFunctions();">
#	<div id="baseDiv">
#x	<div class="viewPlaylistMain">
#x	<div class="headerRCBox">
#x	<div class="content">
#x	<div class="headerTitle">
#x	<span>Playlist: \S+</span>
    while (my $token = $p->get_tag("div")) {
		$token->[1]{class} eq 'viewPlaylistMain' and do {
			$token = $p->get_tag("div") and 
			$token->[1]{class} eq 'headerRCBox' and do {
				$token = $p->get_tag("div") and 
				$token->[1]{class} eq 'content' and do {
					$token = $p->get_tag("div") and 
					$token->[1]{class} eq 'headerTitle' and do {
					$token = $p->get_tag("span") and 
		  				$p->get_trimmed_text("/span") =~ /Playlist: / and
							 $' and do return $';
					}
				}
			}
		}
	}


    # title
    my $p = HTML::TokeParser->new(\$html);
    if ($p->get_tag("title")) {
        return $p->get_trimmed_text;
    }
}