Giter VIP home page Giter VIP logo

Comments (3)

kou avatar kou commented on August 13, 2024 1

I've implemented it and released a new version.

We'll not provide accessors for unknown tags. It's by design.

from rss.

olleolleolle avatar olleolleolle commented on August 13, 2024

I learned a little more about itunes:episodeType at Apple's Help Page for their podcast RSS extensions.

Not answering your question: but guessing at a solution that changes the ruby/rss implementation!

Perhaps adding episodeType to the item section of the itunes-specific code in this repo would be a way to get the data? https://github.com/ruby/rss/blob/master/lib/rss/itunes.rb#L267 - I am suggesting that this list of tags could be extended to also know about the episodeType?

Hope this helps - and do make a PR if you feel you want to pursue it.

Here is an executable little script to work on this:

require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'
  gem 'pry'
end

require 'open-uri'
require 'pry'
require 'rss'
require 'uri'

MINDSCAPE_FEED = 'https://rss.art19.com/sean-carrolls-mindscape'
URI.open(MINDSCAPE_FEED) do |rss|
  feed = RSS::Parser.parse(rss, ignore_unknown_element = true)

  puts "Title: #{feed.channel.title}"
  feed.items.each do |item|
    binding.pry
    puts item.itunes_episode_type
  end
end
Executable script

from rss.

timuckun avatar timuckun commented on August 13, 2024

I think that if there was a way to access a tag by name it would be a more generic solution so that the code doesn't have to change every time somebody decides to add a tag to their RSS feed.

Maybe even adding a hook where I could write a couple of lines of code would be OK.

from rss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.