Sha256: 4c0801c3f40165dc814cd138279bc1a7976f614f53729018bd951d4af4adeee4
Contents?: true
Size: 620 Bytes
Versions: 32
Compression:
Stored size: 620 Bytes
Contents
require 'rubygems' require File.dirname(__FILE__) + "/../../lib/feedzirra.rb" feed_urls = File.readlines(File.dirname(__FILE__) + "/top5kfeeds.dat").collect {|line| line.split.first} success = lambda do |url, feed| puts "SUCCESS - #{feed.title} - #{url}" end failed_feeds = [] failure = lambda do |url, response_code, header, body| failed_feeds << url if response_code == 200 puts "*********** FAILED with #{response_code} on #{url}" end Feedzirra::Feed.fetch_and_parse(feed_urls, :on_success => success, :on_failure => failure) File.open("./failed_urls.txt", "w") do |f| f.write failed_feeds.join("\n") end
Version data entries
32 entries across 32 versions & 10 rubygems