IT戦記

プログラミング、起業などについて書いているプログラマーのブログです😚

ニコニコ動画がもうすぐ 100 億再生!

このペースでいくと

ゴールデンウィーク中に突破するかな。
ニコニコ動画総再生数(百万単位)
何かアニバーサリー的なのはないのかな、かな、かな?

bashperl で、 1 分置きにニコニコ動画の再生数を表示するワンライナー

while :; do perl -MLWP::Simple -MHTML::TreeBuilder::XPath -le "print HTML::TreeBuilder::XPath->new_from_content(get shift)->findnodes(shift)->[0]->content->[0]" http://nicovideo.jp/ "id('PAGEFOOTER')//strong[2]" && sleep 60 ; done
clear と jabanner などを組み合わせると、いい感じです。

while :; do clear && perl -MLWP::Simple -MHTML::TreeBuilder::XPath -le "print HTML::TreeBuilder::XPath->new_from_content(get shift)->findnodes(shift)->[0]->content->[0]" http://nicovideo.jp/ "id('PAGEFOOTER')//strong[2]" | jabanner -a && sleep 60 ; done

DOS プロンプトと perl で、 1 分置きにニコニコ動画の再生数を表示するワンライナー

for /L %i in (0,0,1) do perl -MLWP::Simple -MHTML::TreeBuilder::XPath -le "print HTML::TreeBuilder::XPath->new_from_content(get shift)->findnodes(shift)->[0]->content->[0]" http://nicovideo.jp/ "id('PAGEFOOTER')//strong[2]" && timeout 60