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

Version Path
feedzirra-0.2.0.rc2 spec/sample_feeds/run_against_sample.rb
feedzirra-0.2.0.rc1 spec/sample_feeds/run_against_sample.rb
jashmenn-feedzirra-0.1.3 spec/sample_feeds/run_against_sample.rb
feedzirra-0.1.3 spec/sample_feeds/run_against_sample.rb
feedzirra-0.1.2 spec/sample_feeds/run_against_sample.rb
seanwalbran-feedzirra-0.1.3 spec/sample_feeds/run_against_sample.rb
seanwalbran-feedzirra-0.1.2 spec/sample_feeds/run_against_sample.rb
localist-feedzirra-0.2.1 spec/sample_feeds/run_against_sample.rb
feedzirra-0.1.1 spec/sample_feeds/run_against_sample.rb
feedzirra-0.1.0 spec/sample_feeds/run_against_sample.rb
feedzirra-0.0.31 spec/sample_feeds/run_against_sample.rb
feedzirra-0.0.30 spec/sample_feeds/run_against_sample.rb