Hatena::Groupsubtech

subpop

2006-09-07

Plagger 調べ

| 18:16 |  Plagger 調べ - subpop を含むブックマーク はてなブックマーク -  Plagger 調べ - subpop  Plagger 調べ - subpop のブックマークコメント

スクリプト

#!/usr/bin/env perl -l

use strict;
use warnings;
use LWP::UserAgent;

my $limit   = 30;
my $cols    = 12;
my $plagger = 'plagger';
my $google  = 'http://www.google.co.jp/search?q=';
my $ua      = LWP::UserAgent->new(agent => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6');

print '+-' . '-' x (length($plagger) + $limit) . '-+-' . '-' x $cols . '-+';

for my $num ( 0 .. $limit ) {
    my $extended_plagger = 'plagg' . 'g' x $num .'er';
    my $count = extract_count($extended_plagger);

    printf "| %s%s | %s%s |\n",
        $extended_plagger,
        ' ' x (length($plagger) + $limit - length($extended_plagger)),
        ' ' x ($cols - length($count)),
        $count;
}

print '+-' . '-' x (length($plagger) + $limit) . '-+-' . '-' x $cols . '-+';

sub extract_count {
    return $ua->get($google . shift)->content =~ m|約 <b>\s*([0-9,]+)\s*</b> 件| ? $1 : 0;
}

結果。

+---------------------------------------+--------------+
| plagger                               |    3,220,000 |
| plaggger                              |      443,000 |
| plagggger                             |           74 |
| plaggggger                            |            0 |
| plagggggger                           |           13 |
| plaggggggger                          |            0 |
| plagggggggger                         |            0 |
| plaggggggggger                        |            0 |
| plagggggggggger                       |            0 |
| plaggggggggggger                      |            0 |
| plagggggggggggger                     |            0 |
| plaggggggggggggger                    |            0 |
| plagggggggggggggger                   |            0 |
| plaggggggggggggggger                  |            0 |
| plagggggggggggggggger                 |            0 |
| plaggggggggggggggggger                |            0 |
| plagggggggggggggggggger               |            0 |
| plaggggggggggggggggggger              |            0 |
| plagggggggggggggggggggger             |            0 |
| plaggggggggggggggggggggger            |            0 |
| plagggggggggggggggggggggger           |            0 |
| plaggggggggggggggggggggggger          |            0 |
| plagggggggggggggggggggggggger         |            0 |
| plaggggggggggggggggggggggggger        |            0 |
| plagggggggggggggggggggggggggger       |            0 |
| plaggggggggggggggggggggggggggger      |            0 |
| plagggggggggggggggggggggggggggger     |            0 |
| plaggggggggggggggggggggggggggggger    |            0 |
| plagggggggggggggggggggggggggggggger   |            0 |
| plaggggggggggggggggggggggggggggggger  |            0 |
| plagggggggggggggggggggggggggggggggger |            0 |
+---------------------------------------+--------------+

Fix Shoco-tan Blog

| 10:42 |  Fix Shoco-tan Blog - subpop を含むブックマーク はてなブックマーク -  Fix Shoco-tan Blog - subpop  Fix Shoco-tan Blog - subpop のブックマークコメント

なんかもう直ったぽ。 しょこたん☆ぶろぐフィードに含まれている画像 URL がおかしいせいで、LDR 内で画像が見られない。 つか、それGre
// ==UserScript==
// @name          LDR Fix Shocotan Blog
// @namespace     http://antipop.gs/
// @include       http://reader.livedoor.com/reader/*
// ==/UserScript==

(function(){
    var w = unsafeWindow;
    var _onload = w.onload;
    var onload  = function(){with (w) {

        register_hook('before_printfeed', function (feed) {
            if (feed.channel.link.match(/http:\/\/yaplog.jp\//)) {
                feed.items.forEach(function (item) {
                    item.body = item.body.replace(/[^"]*\/cv(.+?)_([^"]+?)/g, '$1/$2');
                });
            }
        });

    }};

    w.onload = function(){
        _onload();
        onload();
    };
})();

Buzz Out Loud

| 01:56 |  Buzz Out Loud - subpop を含むブックマーク はてなブックマーク -  Buzz Out Loud - subpop  Buzz Out Loud - subpop のブックマークコメント

ここひと月ばかり Buzz Out Loud をずっと聴いてる。Veronica たん萌へ萌へ。まぁ、半分も理解できてないけど><。ともあれ、これの日本版を、CNET JAPAN (じゃなくてもいいけど)には期待したいところ。 Veronica たんについては、↑のページだとなんか微妙な感じだけど、以下の動画がステキ。 http://www.cnet.com/av/vcast/BOL_snakes.m4v