From 2f6895e118e610e8a0f606ed654aab4d1abe36e8 Mon Sep 17 00:00:00 2001 From: James Loh Date: Sat, 21 Aug 2021 17:29:39 +1000 Subject: [PATCH] Fix finding JSON feeds with new MIME type The 1.1 version (https://jsonfeed.org/version/1.1) for JSON feeds defines that feeds should have a MIME type of `application/feed+json` which Miniflux wasn't searching for --- reader/subscription/finder.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reader/subscription/finder.go b/reader/subscription/finder.go index 40c87bcd..718116d1 100644 --- a/reader/subscription/finder.go +++ b/reader/subscription/finder.go @@ -69,9 +69,10 @@ func FindSubscriptions(websiteURL, userAgent, cookie, username, password string, func parseWebPage(websiteURL string, data io.Reader) (Subscriptions, *errors.LocalizedError) { var subscriptions Subscriptions queries := map[string]string{ - "link[type='application/rss+xml']": "rss", - "link[type='application/atom+xml']": "atom", - "link[type='application/json']": "json", + "link[type='application/rss+xml']": "rss", + "link[type='application/atom+xml']": "atom", + "link[type='application/json']": "json", + "link[type='application/feed+json']": "json", } doc, err := goquery.NewDocumentFromReader(data)