dwilde1
unread,Feb 29, 2012, 10:06:27 AM2/29/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to feedzirra, pa...@pauldix.net
Paul,
I updated my code to try and take advantage of your new
(0.1.2) :on_success/:on_failure handler, but I always got
the :on_failure branch even though I'm getting 200 codes back. I had
to back it out.
def test_rss_feed( characteristics )
new_characteristics = Hash.new
feed =
Feedzirra::Feed.fetch_and_parse( characteristics['source_url'],
:on_success => lambda { | feed |
puts " Good feed!"
new_characteristics = process_good_rss_feed( feed,
characteristics ) },
:on_failure => lambda { | url,
response_code,
response_header,
response_body |
puts " Bad Feed"
new_characteristics = process_bad_rss_feed( url,
response_code,
response_header,
response_body,
characteristics ) } )
return new_characteristics
end
<eom>