Thomas Wieczorek wrote:
> On Thu, Aug 21, 2008 at 12:50 PM, Lex Williams <etaern / yahoo.com> wrote:
>>
>> Instead of using a regular expression you could consider a html parser ,
>> and/or do a xpath search to retrieve images. Check hpricot .
>>
> 
> Yeah, it is quite easy with Hpricot:
> 
> require 'open-uri'
> require 'hpricot'
> 
> site = 
> Hpricot(open("http://code.google.com/edu/submissions/SedgewickWayne/index.html"))
> site.search("//img") #=> returns an array of all images



yes i used as this
doc = Hpricot.parse(item.description)
   imgs = doc.search("//img")
   @src_array = imgs.collect{|img|img.attributes["src"]}

but it gives only the Image Url's but I need to Get
  tag Fully ...
Any Helps
-- 
Posted via http://www.ruby-forum.com/.