Changeset 18931 for lang/ruby

Show
Ignore:
Timestamp:
09/07/08 03:50:45 (3 months ago)
Author:
koshigoe
Message:

* softbank の絵文字を取得できる様に修正

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/ssb/trunk/scripts/emoji_scrape.rb

    r2155 r18931  
    7878 
    7979  def self.scrape_thirdforce 
    80     base_uri = 'http://developers.softbankmobile.co.jp/dp/tool_dl/web/' 
     80    base_uri = 'http://creation.mb.softbank.jp/web/' 
     81    page = 'web_pic_%02d.html' 
    8182    1.upto(6) do |n| 
    8283      pict_scraper = Scraper.define { 
    83           process 'td:nth-child(2) > font.j10', :unicode => :text 
    84           process 'td > img',      :image  => '@src' 
     84          process 'td:nth-child(2)[bgcolor="#FFFFFF"]', :unicode => :text 
     85          process 'td > img', :image  => '@src' 
    8586          result :unicode, :image 
    8687      } 
     
    8889        process 'table[width="100%"] > tr', 'pictograms[]' => pict_scraper 
    8990        result :pictograms 
    90       }.scrape(URI.parse(base_uri + 'picword_%02d.php' % n)).select {|x| not x.nil? }.select {|x| not x.unicode.nil? }.each {|pictinfo| 
     91      }.scrape(URI.parse(base_uri + page % n)).select {|x| not x.nil? }.select {|x| not x.unicode.nil? }.each {|pictinfo| 
    9192        tmpfile = File.join(emoji_dir('softbank'), pictinfo.unicode + '.tmp.gif') 
    9293        filename = File.join(emoji_dir('softbank'), pictinfo.unicode + '.gif')