http://blog.labnotes.org/category/scrapi/ ruby ã§ã¹ã¯ã¬ã¤ãã³ã°ã㦠web ã®æ å ±ãåå¾ããã®ã«ã¯ãä»ã¾ã§æ£è¦è¡¨ç¾ã xpath ã§ãã£ã¦ãã®ã§ãããã¨é¢åã§ãããã§ããµã¨ scrAPI ã¨ããã¹ã¯ã¬ã¤ãã³ã°ãã¼ã«ããããç¥ã£ãã®ã§ããããããããªã便å©ããã ãã®ãã¼ã«ãããã使ãã¨ãCSS3 ãªã»ã¬ã¯ã¿ãè¨è¿°ãããã¨ã§ãè¦ç´ ãåå¾ãããã¨ãã§ãã¾ãããã¨ãã°ã¨ãããµã¤ãã®ãªã³ã¯ãå ¨é¨åå¾ããããã°ã require 'rubygems' require 'scrapi' require 'open-uri' require 'nkf' require 'pp' $KCODE = 'u' links = Scraper.define do process "a[href]", "urls[]"=>"@href" result :urls e
{{#tags}}- {{label}}
{{/tags}}