Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Vienna more flexible in searching articles within certain feeds #1676

Open
tijmenvangulik opened this issue Apr 23, 2023 · 6 comments
Open

Comments

@tijmenvangulik
Copy link

Describe the bug
I add the following rss feed which seems to be a valid rss feed but vienna can not find any articles

To Reproduce
Add the following feed:
https://www.deingenieur.nl/nieuws/rss/all

In the log you see:

Connecting to https://www.deingenieur.nl/nieuws/rss/all
124 KB received
And message: No articles in feed
When you open the feed in a browser you see that er many news items in de feed

Screenshots
Add screenshots to help explain your problem, if possible.

Please complete the following information:

  • Vienna version n 3.8.7 :15608906: (8038)
  • macOS 13.2.1
@Eitot
Copy link
Contributor

Eitot commented Apr 23, 2023

It is actually not a valid RSS feed. The <item> elements (these are the feed's entries) are supposed to be child elements of the <channel> element. This feed here places the <item> elements outside of the <channel> element, which is why Vienna does not find them.

<rss version="2.0">
    <channel>
        <title>de-ingenieur</title>
        <pubDate>Sun, 23 Apr 2023 13:02:58 +0200</pubDate>
        <copyright>Copyright (c) 2023, De Ingenieur</copyright>
        <language>nl</language>
        <description>De Ingenieur Rich Site Summary</description>
    </channel>
    <link>https://www.deingenieur.nl/nieuws/rss/all</link>
    <item>
        <title>Waterstof tanken bij mobiele pomp</title>
...

@tijmenvangulik
Copy link
Author

tijmenvangulik commented Apr 23, 2023 via email

@Eitot
Copy link
Contributor

Eitot commented May 1, 2023

Interestingly, Reeder does work with this feed. This raises the question whether Vienna could have more lenient parsing of RSS feeds here, e.g. looking for <item> elements regardless where they are located.

@barijaona What do you think? Feature request?

@barijaona
Copy link
Member

I am all in favor of more flexibility.

But there are various popular specifications of RSS which are in fact unrelated, so we'll have to be careful not to break feeds conforming to a specific specification.

@barijaona
Copy link
Member

Examples:

  • in the example listed for RSS 0.9,<item>s are outside <channel>
  • in the example listed for RSS 1.0, <item>s are listed inside <channel> and detailed outside <channel>

Good to know: work on RSS 1.0 and RSS 2.0 were done separately. The later is not the successor of the former.

@Eitot
Copy link
Contributor

Eitot commented May 1, 2023

It is dubious. All of the sample files on that webpage have <item> elements as child elements of <channel>. The specifications of 0.90, 0.91 and 0.92 do not explicitly say where <item> should be placed, but imply that it is a child element of <channel>: "An item that is associated with a channel" and "There can be no more than 15 in a 0.91 ". Regardless, RSS 2.0 – which is what this feed claims to follow – does not allow this.

However, would it be harmful to look for <item> elements under the <rss> element if no items are found under <channel>? If a particular RSS feed was extended with custom elements, it would be using namespaces (which could be ignored when looking for <item> elements outside of <channel>).

@barijaona barijaona changed the title Valid feed but vienna can cannot find articles in feed Make Vienna more flexible in searching articles within certain feeds Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants