Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Cant parse media content

未关闭
#18 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
30/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
ruby
领域
backend

调研方向

使用提供的 Independent RSS URL 和 media:content 示例,通过 RSS::Parser.parse 重现失败,然后跟踪在迭代 rss.items 时如何处理该元素。当无需出现所报告的错误即可解析媒体内容,并且可以如示例所示访问其 URL 时,该 issue 即完成。

由索引模型根据 Issue 内容生成。

描述

I have been trying to parse media content and don't seem to be able to capture it. I can get the basics but trying to get something like the url of the image below throws an error.

<media:content url="https://static.independent.co.uk/s3fs-public/thumbnails/image/2020/03/10/14/payday-loans-5.jpg" type="image/jpeg" medium="image"/>

Example of code I'm trying.

require 'rss'

rss = RSS::Parser.parse('http://www.independent.co.uk/rss', false)

rss.items.each do |item|
  puts "#{item.title}"
  puts "#{item.media_content.url}"

end
主要语言
Ruby
星标
206
派生
39
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ruby/rss 的其他 Issue

查看 ruby/rss 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。