How to get Feedjira to work with HTTPS feeds?

316 Views Asked by At

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
1

There are 1 best solutions below

0
Evan Appleby On BEST ANSWER

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