google-code-export / feedparser

Automatically exported from code.google.com/p/feedparser
Other
1 stars 0 forks source link

additional dc:creator tags are discarded #342

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
This appears to be happening because the element in question is dc:creator, 
which is not triggering the code paths that would save multiple authors. I'll 
fix this as soon as I have an opportunity. Thanks for reporting this!

Original comment by kurtmckee on 12 Apr 2012 at 4:42

GoogleCodeExporter commented 9 years ago
Doesn't this happen with other tags too?

See: 
http://stackoverflow.com/questions/6559612/unable-to-retrieve-multiple-tags-from
-feed-using-feedparser

Also company:symbol for example, in a feed that tags news stories with multiple 
symbols.

What's the expected behavior in general?

Original comment by bdkea...@gmail.com on 4 May 2012 at 12:35

GoogleCodeExporter commented 9 years ago

Original comment by kurtmckee on 28 May 2012 at 3:19