jsumners / jsumners/feedparser
text of namespaced elements with attributes is discarded
Open
Nobody has claimed this yet.
auto-migrated
Component-Parser
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Using 5.0 and this feed http://xurrency.com/gbp/feed I can't get the value of
<dc:value>. This was working fine in 4.1.
f = feedparser.parse('http://xurrency.com/gbp/feed')
e = f['entries'][0]
print type(e['dc_value'])
> <type 'dict'>
print e['dc_value']
> {'decimal': u'4', 'frequency': u'daily'}
print e['dc_value'].value
> AttributeError: 'dict' object has no attribute 'value'
Do the docs need to be updated and you're now meant to do this differently or
is something else wrong?
Original issue reported on code.google.com by kylemacfarlane@gmail.com on 20 Feb 2011 at 10:21
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with feedparser.parse against the cited feed and inspect how namespaced elements with attributes are represented. Identify the parser entry point handling dc:value, then add a regression test showing that the element's text remains accessible alongside its decimal and frequency attributes.
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