You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Maybe this could help. I was experiencing the same issues as you had and I did the following: Remove inclusions and exclusions and let de feeder fetch al the value. To my surprise the description field in the xml was beed imported as "summary". Also noticed that the image was not been feeded.
After doing some extra research I found that there are two problems:
1.- There are no images (at least article related images) inside the feed. The only solution I can see is modifying the feeder to search for images following the link. I am trying to do this, I will keep you updated.
2.- But also, the feed explorer does not support multiline images and the small images that appear on the feed are written across multiple lines. This can be solved bi adding a re.DOTALL as de last parameter of the re.findall function on line 95. But again the only images there are in the feed are the ones shown in your post.
Line 95: images = re.findall(r"<img.+?src=\"(.+?)\".+?>", entry['summary'], re.DOTALL)
That is a gross solution (Not your fault, just overall a lot of work). Do you know of a feed that works with this card that I can use without jumping through hoops?
I only take 10 news because mi connection is slow and it has to load all the selected news.
Now the card:
entity: sensor.news
title: News feed
feed_attribute: entries
columns:
- title: ''
type: image
add_link: link
field: linkimage
width: 126
- title: Title
field: title
Finally the code added at line 99:
if 'linkimage' in self._inclusions and 'linkimage' not in entryValue.keys():
images = []
if 'link' in entry.keys():
req = Request(entry['link'])
html_page = urlopen(req)
images = re.findall(r"<img.+?src=\"(.+?)\".+?>", html_page.read().decode('utf-8'), re.DOTALL)
if images:
entryValue['linkimage'] = images[0]
I know it is not nice. But you can not do it with just the feed you want. The image information is not there. I can not think of any other way of getting an image for then entities of the feed since there is no image in it.
Hi,
Maybe this could help. I was experiencing the same issues as you had and I did the following: Remove inclusions and exclusions and let de feeder fetch al the value. To my surprise the description field in the xml was beed imported as "summary". Also noticed that the image was not been feeded.
I had exactly the same, description was in the feed but somehow renamed to summary
Activity
iantrich commentedon Jan 30, 2021
Card config fmdoesnt matter if your sensor is not being populated. Is there data in the feedparser sensor if you look in the Developer Toola > States?
cperryoh commentedon Jan 31, 2021
There is

iantrich commentedon Jan 31, 2021
So each entry only has title and link, so that's the only fields you can use in the card
cperryoh commentedon Feb 1, 2021
I got it to populate but the images for each story are just the hassio icon. I've tried multiple news feeds and it's the same issue.
cperryoh commentedon Feb 1, 2021
or this

iantrich commentedon Feb 1, 2021
Well is there an image in the feed? Looked like a link to the story itself
cperryoh commentedon Feb 1, 2021
Yes there is
I'll take this top story for example:

Here is what the feedparser lists as the image:
http://feeds.feedburner.com/~ff/rss/cnn_topstories?d=yIl2AUoC8zA
Here is the actual article:
https://www.cnn.com/2021/02/01/us/coronavirus-vaccines-variants-return-to-normal/index.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+rss%2Fcnn_topstories+%28RSS%3A+CNN+-+Top+Stories%29
Do you by chance have a feed that you know works with images that I can try out?
cecheto commentedon Feb 2, 2021
Hi,
Maybe this could help. I was experiencing the same issues as you had and I did the following: Remove inclusions and exclusions and let de feeder fetch al the value. To my surprise the description field in the xml was beed imported as "summary". Also noticed that the image was not been feeded.
cperryoh commentedon Feb 2, 2021
I don't know if this is exactly what you meant but I blew away all inclusions and exclusions and now my feed won't populate. Maybe I misunderstood.
Here is the state of the parser:

Here is my config:
And my Lovelace end looks like this:

cecheto commentedon Feb 2, 2021
After doing some extra research I found that there are two problems:
1.- There are no images (at least article related images) inside the feed. The only solution I can see is modifying the feeder to search for images following the link. I am trying to do this, I will keep you updated.
2.- But also, the feed explorer does not support multiline images and the small images that appear on the feed are written across multiple lines. This can be solved bi adding a re.DOTALL as de last parameter of the re.findall function on line 95. But again the only images there are in the feed are the ones shown in your post.
Line 95:
images = re.findall(r"<img.+?src=\"(.+?)\".+?>", entry['summary'], re.DOTALL)cperryoh commentedon Feb 2, 2021
That is a gross solution (Not your fault, just overall a lot of work). Do you know of a feed that works with this card that I can use without jumping through hoops?
cecheto commentedon Feb 2, 2021
This is what you search for?

cecheto commentedon Feb 2, 2021
This is how I did it, first the sensor:
I only take 10 news because mi connection is slow and it has to load all the selected news.
Now the card:
Finally the code added at line 99:
I know it is not nice. But you can not do it with just the feed you want. The image information is not there. I can not think of any other way of getting an image for then entities of the feed since there is no image in it.
Romkabouter commentedon Feb 13, 2021
I had exactly the same, description was in the feed but somehow renamed to summary