Sfoglia il codice sorgente

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
James Loh 4 anni fa
parent
commit
2f6895e118
1 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. 4 3
      reader/subscription/finder.go

+ 4 - 3
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)