Rss feeds

Using Rss Parser I loaded Some Url’s into the database.
All The Rss feeds has been stored in the table.
All The Rss Stories Has Been Stored In the Stories Table.
Stories Table Has Fields Like Story Name Story Description
Story Description Fields Contains Images Too…
That Story description must Not Contain Images
I want to restrict the images Not to be shown in the view.
Images has to be displayed separetely.Not Inside the Story Description
I Extracted the Images and dispalyed separately using Hpricot.
But My Story Description Field Shows the Images. I don’t Know How to
Restrict the Images To Be Shown…
Any Advices…

My COde Starts Here

require ‘rss’
require ‘open-uri’
require ‘hpricot’

@feeds = Feed.find(:all)
@feeds.each do |f|
puts f.url
feed = RSS::Parser.parse(f.url)

puts “== #{} ==”
puts “channel name: #{}”
feed.items.each do |item|
puts “Title: #{item.title}”
puts “URL: #{}”

puts “Description: #{item.description}”

@stories =
@stories.title = item.title
@stories.description = item.description
@stories.feed_id =
@stories.guid = item.guid

doc = Hpricot.parse(item.description)
imgs ="//img")

@src_array = imgs.collect{|img|img.attributes[“src”]}

@src_array = @src_array.to_s

@stories.picture = @src_array


Newb N. wrote:

doc = Hpricot.parse(item.description)
imgs ="//img")

@src_array = imgs.collect{|img|img.attributes[“src”]}

Instead of the last line, does this work?

imgs.each do |img|
  img.attributes['src'] = nil

Now remember what I said about alternate kinds of images!