Feedjira setup for YouTube rss parsing

143 views Asked by At

I am trying to pull in the first video from an unlisted YouTube playlist. I found the simple_parser gem but since it hasn't been updated in a few years, I decided to go with feedjira instead. I'm not sure if this is my lack of knowledge and feedjira's lack of advice for noobs or if feedjira has a bug.

Anyhow, I'm getting this error: uninitialized constant Youtube::Feedjira

Here's my code:

def open_rss
    playlist_url = "https://www.youtube.com/feeds/videos.xml?playlist_id=" + playlist_id

    feed = Feedjira::Feed.fetch_and_parse playlist_url
    video = feed.entries.first

    details = {:title => video.title,
                :description => video.content,
                :url => video.media_url,
                :thumbnail => video.media_thumbnail_url
                }

    return details
end

I don't know if I missed a setup step or what since I couldn't find much info on setting this thing up. Thanks for the help!

0

There are 0 answers