jsumners / jsumners/feedparser

additional dc:creator tags are discarded

Open
#342 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-migrated Namespace-dc
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

What steps will reproduce the problem?
1. Import feed with multiple <dc:creator> within each <item>
Example feed: 
<item>
  <title>This is my article</title>
  <link>www.google.com</link>
  <dc:creator>John Doe</dc:creator>
  <dc:creator>Jane Doe</dc:creator>
  <content><p>My article copy goes here</p></content>
</item>

2. Code is as follows

feed = feedparser.parse('http://www.test.com/sample.xml')

for entry in feed.entries:

    item = {
        'authors': entry.authors,
     }
    entries.append(item)
print entries


What is the expected output? What do you see instead?
Expected to see:
>[{'author': [{John Doe}, {Jane Doe}]}] 

Instead see: 
> [{'author': [{}, {} ]}]

What version of the product are you using? On what operating system?
Feedparser 5.1.1 // Mac OS 10.7.3 // Python 2.7.2 // Feed is RSS 2.0 

Please provide any additional information below.
I cannot get multiple authors to parse correctly in v5.1 or v5.1.1, despite 
seeing an apparent patch in Issue #42 that was fixed on Dec 1, 2010. 

Original issue reported on code.google.com by jason.se...@gmail.com on 11 Apr 2012 at 6:27

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 by reproducing the issue with the sample RSS item and the feedparser.parse call, then inspect how entry.authors is populated for repeated dc:creator tags. Done means the resulting authors data retains both John Doe and Jane Doe instead of empty author objects.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.