feedparser
feedparser copied to clipboard
Cant read description with ![CDATA]
Hello. Im trying to read out the school meal from this https://skolmaten.se/ede-skola/rss/weeks/?limit=2,
However the description is not read, possibly due to ![CDATA]? It appears to be valid in XML. Any ideas?
I have the same problem with https://data.buienradar.nl/1.0/feed/xml/rssbuienradar
<description>
<![CDATA[
message.here ]]>
</description>
I have the same problem with https://api.met.no/weatherapi/metalerts/1.1/
Apologies for joining the party so late. According to the documentation of feedparser some fields seem to be renamed, e.g. description => summary and pubDate => published. It took me quite a while to realize this as I too thought it was some kind of parsing bug.
According to the documentation of feedparser some fields seem to be renamed, e.g. description => summary and pubDate => published. It took me quite a while to realize this as I too thought it was some kind of parsing bug.
Thanks! I had a similar parsing issue but got it working with the summary tag. Description is all over the documentation but it doesn't seem to work anymore.
I have the same issue with this feed:
https://feeds.bbci.co.uk/news/world/us_and_canada/rss.xml
Any way we can help get this fixed?
@qJake Could you share your YAML config for the stream you shared?
According to the documentation of feedparser some fields seem to be renamed, e.g. description => summary and pubDate => published. It took me quite a while to realize this as I too thought it was some kind of parsing bug.
Thanks! I had a similar parsing issue but got it working with the summary tag. Description is all over the documentation but it doesn't seem to work anymore.
Using https://data.buienradar.nl/1.0/feed/xml/rssbuienradar
- exclusions: []
feed_url: https://data.buienradar.nl/1.0/feed/xml/rssbuienradar
inclusions:
- image
- title
- link
- published
local_time: false
name: 'buienradar_nl '
platform: feedparser
scan_interval:
seconds: 3600
show_topn: 9999
For each entry in the parsed feed entry.summary == entry.description
.
Could someone confirm that this issue still persists?
@sljdhl Using the latest beta version, feedparser correctly reads the data correctly.
My sensor config:
- date_format: '%a, %d %b %Y %H:%M:%S UTC%z'
exclusions: []
feed_url: https://skolmaten.se/ede-skola/rss/weeks/?limit=2
inclusions:
- title
- link
- published
- summary
local_time: false
name: skolmaten_se_ede_skola
platform: feedparser
scan_interval:
seconds: 3600
show_topn: 9999
How it shows in developer tools
How it renders in Lovelace using list-card:
list-card config:
type: custom:list-card
entity: sensor.skolmaten_se_ede_skola
title: Test feed
feed_attribute: entries
columns:
- title: Title
field: title
style:
- white-space: wrap
add_link: link
- title: Published
field: published
- title: Summary
field: summary
@dvesters Same here, using the latest beta version, I got the following results:
In Lovelace:
In developer tools:
Sensor config:
- date_format: '%a, %d %b %Y %H:%M:%S UTC%z'
exclusions: []
feed_url: https://data.buienradar.nl/1.0/feed/xml/rssbuienradar
inclusions:
- image
- title
- link
- published
local_time: false
name: buienradar_nl
platform: feedparser
scan_interval:
seconds: 3600
show_topn: 9999
Lovelace config:
type: custom:list-card
entity: sensor.buienradar_nl
title: Test feed
feed_attribute: entries
columns:
- title: ''
type: image
add_link: link
field: image
- title: Title
field: title
style:
- white-space: wrap
add_link: link
- title: Published
field: published
Apologies for joining the party so late. According to the documentation of feedparser some fields seem to be renamed, e.g. description => summary and pubDate => published. It took me quite a while to realize this as I too thought it was some kind of parsing bug.
README.md will be fixed as a part of #90.
I have the same problem with api.met.no/weatherapi/metalerts/1.1
@jgallis Works for me using the latest beta version.
config:
- date_format: '%a, %d %b %Y %H:%M:%S UTC%z'
exclusions: []
feed_url: https://api.met.no/weatherapi/metalerts/1.1/
inclusions:
- title
- link
- published
- summary
local_time: false
name: api_met_no_metalerts
platform: feedparser
scan_interval:
seconds: 3600
show_topn: 9999
lovelace config:
type: custom:list-card
entity: sensor.api_met_no_metalerts
title: Test feed
feed_attribute: entries
columns:
- title: Title
field: title
style:
- white-space: wrap
add_link: link
- title: Published
field: published
sensor with its attributes in UI:
How it shows in Lovelace using list-card: