ruby / ruby/rss

Parsing enc:enclosure

Open
#14 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
206
Forks
39
PR merge metrics
No merged PRs in 30d

Description

I was attempting to parse an RSS doc with

<enc:enclosure resource="http://image_url" type="image/jpeg"/>
<item rdf:about="https://dallas.craigslist.org/dal/cto/d/mckinney-2003-acura-cl-type/7109117586.html">
<title><![CDATA[2003 ACURA CL TYPE-S (MCKINNEY) &#x0024;850]]></title>
<link>https://dallas.craigslist.org/dal/cto/d/mckinney-2003-acura-cl-type/7109117586.html</link>
<description><![CDATA[SELLING MY BELOVED HONDA FOR PARTS OR PERSONAL PROJECT. ENGINE IN GREAT SHAPE HAS 165,000 ML MAINTATINED REALLY WELL, CLEAN TITLE. BRAND NEW FRONT SUSPENSION, GOOD BREMBOO BRAKES, TIRES IN GOOD SHAPE, EVERYTHING WORKS INSIDE CAR, FRONT SEAT BIT TORN. ...]]></description>
<dc:date>2020-04-16T10:51:41-05:00</dc:date>
<dc:language>en-us</dc:language>
<dc:rights>copyright 2020 craigslist</dc:rights>
<dc:source>https://dallas.craigslist.org/dal/cto/d/mckinney-2003-acura-cl-type/7109117586.html</dc:source>
<dc:title><![CDATA[2003 ACURA CL TYPE-S (MCKINNEY) &#x0024;850]]></dc:title>
<dc:type>text</dc:type>
<enc:enclosure resource="https://images.craigslist.org/00h0h_fyqO7icY0vm_300x300.jpg" type="image/jpeg"/>
<dcterms:issued>2020-04-16T10:51:41-05:00</dcterms:issued>
</item>

Even with passing ignore_unknown_element to the parse method, I could not find these in the parsed results. Does this library not support these enclosures, and if not is there a plan/willingness to have it added? Enclosures seem to be a standard RSS feature: https://en.wikipedia.org/wiki/RSS_enclosure

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the parse method and its ignore_unknown_element option, then trace how namespaced RSS elements are represented in parsed results. Reproduce the provided RSS snippet and determine how enc:enclosure is currently handled. Done means enclosure data is available in the parsed result, with coverage for the example input.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.