2013年3月21日星期四

archlinux chrome goagent 无法看yutube


sudo pacman -S python2-gevent-beta  python2-pyopenssl

python2-pyopenssl没装的话,就算导入了证书,浏览器还是会提示错误。


http://tieba.baidu.com/p/1749710451

2013年3月18日星期一

perl 抓取flvcd生成的链接 保存为播放列表

perl 抓取flvcd生成的链接 保存为播放列表

例如 抓取这个
http://www.flvcd.com/parse.php?kw=http%3A%2F%2Fso.letv.com%2Ftv%2F86764.html&format=high


抓取所有的视频地址 可以保存下链接 在mplayer里播放:


use LWP::Simple;
use HTML::LinkExtor;

#$html = get("http://www.flvcd.com/parse.php?kw=http%3A%2F%2Fso.letv.com%2Ftv%2F86764.html&format=high");


if ( @ARGV == 1 ) {
  #$html = $ARGV[0];
  $html = get($ARGV[0]);
  $link_extor = HTML::LinkExtor->new(\&handle_links);
  $link_extor->parse($html);
}else{
   print "请输入url \n 例如:genLIst.pl \"url\"  url请用引号\n";
}

sub handle_links
{
    ($tag, %links) = @_;

    if ($tag eq 'a') {

        foreach $key (keys %links) {
           
            if ($key eq 'href') {
               if($links{$key} =~ /host=www_letv_com/){  #这里做了一下判断
print "$links{$key}.\n";
      }
             

            }

        }
    }
}

----------------