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

Unable to find any feed in https://www.marcusfolkesson.se/categories/blog/ #2844

Closed
Necior opened this issue Sep 8, 2024 · 2 comments
Closed

Comments

@Necior
Copy link

Necior commented Sep 8, 2024

Steps to reproduce

  1. Go to the "New feed" page
  2. Paste https://www.marcusfolkesson.se/categories/blog/ as the URL
  3. Click "Find a feed"

Observed behavior

Got Unable to find any feed. message.

Expected behavior

miniflux finds https://www.marcusfolkesson.se/categories/blog/index.xml and uses it.

Extra comment

I found the feed manually by viewing the source of the page. As of writing this, /html/body/footer/div/div/div/ul/li[6]/a points to:

<a href="/categories/blog/index.xml" rel="alternate" type="application/rss+xml" title="Marcus Folkesson">
                           <span class="fa-stack fa-lg">
                               <i class="fas fa-circle fa-stack-2x"></i>
                               <i class="fas fa-rss fa-stack-1x fa-inverse"></i>
                           </span>
                       </a>

from which I was able to manually extract the feed URL.

@fguillot
Copy link
Member

fguillot commented Sep 8, 2024

Auto-discovery will work only if the link (<link> tag) is located in <head> section of the HTML page. The HTML code that you are referring to is just a normal HTML link on the page.

For reference: https://www.rssboard.org/rss-autodiscovery#element-link

To support autodiscovery, a link element must be added to the header, as shown in this HTML markup from The RSS Blog:

<html>
  <head>
    <title>The RSS Blog</title>
    <link rel="alternate" type="application/rss+xml" title="RSS"
      href="http://feeds.feedburner.com/TheRssBlog">
  </head>
  <body>
    <!-- the web page's contents -->
  </body>
</html>

Same thing for other feed formats like Atom: https://en.wikipedia.org/wiki/Atom_(web_standard)#Including_in_HTML

However, Miniflux should be able to discover the feeds by trying well-known URLs. Add a trailing slash to the URL and it should work: https://www.marcusfolkesson.se/categories/blog/

image

For reference:

func (f *SubscriptionFinder) FindSubscriptionsFromWellKnownURLs(websiteURL string) (Subscriptions, *locale.LocalizedErrorWrapper) {
knownURLs := map[string]string{
"atom.xml": parser.FormatAtom,
"feed.xml": parser.FormatAtom,
"feed/": parser.FormatAtom,
"rss.xml": parser.FormatRSS,
"rss/": parser.FormatRSS,
"index.rss": parser.FormatRSS,
"index.xml": parser.FormatRSS,
"feed.atom": parser.FormatAtom,
}

@Necior
Copy link
Author

Necior commented Sep 8, 2024

Auto-discovery will work only if the link (<link> tag) is located in <head> section of the HTML page. The HTML code that you are referring to is just a normal HTML link on the page.

Thanks for the context. I emailed the author of the blog to let him know.

However, Miniflux should be able to discover the feeds by trying well-known URLs. Add a trailing slash to the URL and it should work: https://www.marcusfolkesson.se/categories/blog/

I tried with a trailing slash but it didn't help. What helped was upgrading my instance to 2.2.0 🎉 Thanks!

@Necior Necior closed this as completed Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants