rubyrssrubygemsfeedfeedzirra

How to get Feedjira to work with HTTPS feeds?


For instance, the following example code returns 0:

require 'feedjira'
feed_parsed = Feedjira::Feed.fetch_and_parse("https://news.yahoo.com/rss/topstories")
puts feed_parsed

Solution

  • Set ssl_verify_peer to false and that successfully accesses the file. For instance:

    require 'feedjira'
    feed_parsed = Feedjira::Feed.fetch_and_parse("https://news.yahoo.com/rss/topstories", {:ssl_verify_peer => false})
    puts feed_parsed