Anemoneのストレージを変更するシリーズ、ついでにSQLite3とMongoDBも書いておきます。 AnemoneでSQLite3を利用する AnemoneでSQLite3を利用するには、オプションで:storage => Anemone::Storage::SQLite3()と指定するだけです。引数を渡さなければ、anemone.dbという形式のsqlite3ファイルが作成されます。プログラムとしては、次のような形ですね。 require 'anemone' urls = [] urls.push("http://www.yahoo.co.jp") opts = { :storage => Anemone::Storage::SQLite3(), :obey_robots_txt => true, :depth_limit => 0 } Anemone.crawl(urls, opt
![Ruby製のクローラー AnemoneでストレージをSQLite3, MongoDBに変更する - プログラマでありたい](https://cdn-ak-scissors.b.st-hatena.com/image/square/4a5a1e7c12e8a16a76423e8480ccb28f4661e4c3/height=288;version=1;width=512/http%3A%2F%2Fecx.images-amazon.com%2Fimages%2FI%2F41AT4JG2KQL.jpg)