janboddez / feed-reader

A very simple feed reader plugin for WordPress
https://feedreader.site
GNU General Public License v3.0
11 stars 0 forks source link

h-feed support #43

Closed janboddez closed 1 year ago

janboddez commented 1 year ago

Was added. The only thing is my h-feeds often only contain summaries, not the full content. We should probably copy the summary into the content field in such cases, because now clicking through to such an entry will lead to a mostly blank page.

Or, because this can happen for JSON feeds, etc., too: we work on the views to work around this. Or we fix it everywhere, so also for JSON feeds.

Reason it's been working for XML feeds is that SimplePie does this fallback thing for us.

In the (distant) future, we could always try to fetch the actual page and parse it ...

janboddez commented 1 year ago

We should probably copy the summary into the content field in such cases, because now clicking through to such an entry will lead to a mostly blank page.

This is done here: https://github.com/janboddez/feed-reader/commit/35421c53625e1cc60f581e5f0bf1b5f27cf4cea5

janboddez commented 1 year ago

In the (distant) future, we could always try to fetch the actual page and parse it ...

To be added later, but it should be optional. Not too hard for sites that support mf2; for everything else, we need some sort of filtering mechanism to get the actual title and content and so on off the HTML page. There's a bunch of scraper rules packages for popular news sites and such, and what I've done in the past is use XPath or CSS selectors to grab, e.g., the first article.