jsumners / jsumners/feedparser

text of namespaced elements with attributes is discarded

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

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

  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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.