タグ

ブックマーク / blog.bitarts.jp (2)

  • Rubyでクローラー - BitArts Blog

    リンクだけじゃなく、フォーム、イメージ、フレームまでがっつり収集してくれるクローラーが欲しかったんだけどwgetではできないようなので自作することにした。 フォームのフィールドを集めたりするの、ちょっと大変そうだな。。と思ったんだけど、WWW::Mechanizeというライブラリを使ったら超簡単だった。ビバMechanize! require "rubygems" require "mechanize" class CrawlerListener def notify_begin end def pre_request end def notify_response(result) puts %Q{#{result[:method]} #{result[:uri]} #{result[:query] ? result[:query].inspect : ""}} end def post_

    Rubyでクローラー - BitArts Blog
  • FastCGIのインストール(CentOS+Apache2) - BitArts Blog

    CentOSに入ってるApache 2.0でRuby on Railsを動かすべく、FastCGIを入れてみる。 http://www.fastcgi.com/ライブラリをインストール。 $ tar xvfz fcgi-2.4.0.tar.gz $ cd fcgi-2.4.0 $ ./configure $ make $ su # make install OS標準インストールのApache 2.0にインストールする場合は、httpd-develパッケージが必要になるので、yumで入れておく。 $ su # yum install httpd-devel Apach向けのモジュールとしては、http://www.fastcgi.com/にあるmod_fastcgiと、それとは別にhttp://fastcgi.coremail.cn/ってのがある。今回は後者のほうを入れてみる。 $ tar

    FastCGIのインストール(CentOS+Apache2) - BitArts Blog
  • 1