monnierant / obsidian-simple-rss

GNU General Public License v3.0
27 stars 4 forks source link

Problem in addressing attributes on a feed #79

Open dazzakiller opened 7 months ago

dazzakiller commented 7 months ago

Hi,

I'm using the example YouTube feed in your docs: https://www.youtube.com/feeds/videos.xml?channel_id=UCYCwgQAMm9sTJv0rgwQLCxw

(FYI I've also tested on a couple of other YouTube feeds. )

I'm trying to pull out the URL or thumbnail URL as shown in the doc's by using: {{&item.media:group.media:content.$.url}} or for the thumbnail {{&item.media:group.media:thumbnail.$.url}}

No matter what variations I try it just doesn't render. I'm using the YouTube feed Type, which I've double checked looks the same as the docs.

Any ideas where the attribute isn't getting pulled in?

Thanks, and great plugin.

monnierant commented 7 months ago

Hi I found the issue.

In fact the media:content is read as an array as it's a second level key in the item.

So you must use: {{&item.media:group.media:content.0.$.url}} and {{&item.media:group.media:content.0.$.url}}

I will keep your issue open till i update the documentaion but you can already try this.