From d9cd520396a2e1c3db2febcfae7d8bd28bea9366 Mon Sep 17 00:00:00 2001 From: Nazar Kanaev Date: Tue, 1 Sep 2020 23:05:47 +0100 Subject: [PATCH] extend feed links query --- server/crawler.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/server/crawler.go b/server/crawler.go index 36acb25..50f0092 100644 --- a/server/crawler.go +++ b/server/crawler.go @@ -15,7 +15,19 @@ type FeedSource struct { Url string `json:"url"` } -const feedLinks = `link[type='application/rss+xml'],link[type='application/atom+xml']` +const feedLinks = ` + link[type='application/rss+xml'], + link[type='application/atom+xml'], + a[href$="/feed"], + a[href$="/feed/"], + a[href$="feed.xml"], + a[href$="atom.xml"], + a[href$="rss.xml"], + a:contains("rss"), + a:contains("RSS"), + a:contains("feed"), + a:contains("FEED") +` func FindFeeds(r *http.Response) ([]FeedSource, error) { sources := make([]FeedSource, 0, 0)