2012-08-01から1ヶ月間の記事一覧
rubyで日経一部上場企業の一覧を取得する。 http://www.jpubb.com/ さまにアクセスさせていただいています。 require 'rubygems' require 'hpricot' require 'mechanize' require 'kconv' require 'uri' $KCODE="u" str3="http://www.jpubb.com/list/list.ph…
ruby mechanize クローラのサンプル require "rubygems" require "mechanize" require "hpricot" require "kconv" require "uri" #require "timeout" #require "resolv" #require "resolv-replace" $KCODE="u" URL2="http://finance.nifty.com/cs/theme/lst/…
sedでTESTが含まれる行以降を表示 sed -ne '/TEST/,$p' Noun.sh
http://www.pistolfly.jp/weblog/2011/06/open-uritimeout.html Time out時間を1秒に設定。 1秒たって接続できなければあきらめる。 require "rubygems" require "mechanize" require "hpricot" require "kconv" require "uri" #require "timeout" require…
yahoo検索で検索数を表示するスクリプト 検索word: "test" require "rubygems" require "mechanize" require "hpricot" require "kconv" require "uri" $KCODE="u" #tmp123="http://www.aeon.info/" #text="link:"+tmp123; text="test" search=URI.encode(te…
http://weboook.blog22.fc2.com/blog-entry-268.html
require "rubygems" require "mechanize" require "hpricot" require "kconv" require "uri" $KCODE="u" #text="\"http://ntt.co.jp\"" #text="\"a href=\"http://www.toyota.co.jp/\"" #text="link: www.ntt.co.jp -site: ntt.co.jp site: jp" #text="link:…
CSSセレクタ http://weboook.blog22.fc2.com/blog-entry-268.html Hpricot http://route477.net/rubyscraping/?Hpricot%2FShowcase HpricotとCSSセレクタ http://route477.net/d/?date=20070205 require "rubygems" require "mechanize" require "hpricot" r…
rubyでページのURL一覧を取得 例:ヤフーの長野県の検索結果のリンク require "rubygems" require "mechanize" require "hpricot" require "kconv" require "uri" $KCODE="u" text="長野県" search=URI.encode(text.toutf8) URL="http://search.yahoo.co.jp/…