以下の内容はhttps://blog.systemjp.net/entry/20100112/p3より取得しました。


HTML解析のライブラリHpricot

こんな感じで使える

require 'hpricot'
require 'open-uri'

url = 'http://yahoo.co.jp/'

# HTML解析
doc = Hpricot( open(url.chomp).read )

# ページタイトル抽出
title = (doc/:html/:head/:title).text.tosjis
puts title

#imgタグの中で.jpgの者だけ抽出
(doc/:img).each do |img|
 img_address = "#{img[:src]}".tosjis
 if (/.*jpg/ =~ img_address) != nil then
  p img_address
 end
end

ネタ元




以上の内容はhttps://blog.systemjp.net/entry/20100112/p3より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14