Changet getArticles to save timestamp after every updated article as I learned there are feeds which have the articles in wrong order (looking at you spiegel.de).

This commit is contained in:
Martin Dosch 2018-08-03 13:33:57 +02:00
parent 4577ec34c1
commit e64aa5ac63

View file

@ -168,7 +168,6 @@ func getArticles(feedURL string, max int) (string, error) {
continue continue
} }
if i == 0 {
last = updateTime last = updateTime
lastUpdate.LastChange = updateTime.Format(time.RFC3339) lastUpdate.LastChange = updateTime.Format(time.RFC3339)
@ -191,7 +190,6 @@ func getArticles(feedURL string, max int) (string, error) {
if err != nil { if err != nil {
log.Fatal("Error: ", err) log.Fatal("Error: ", err)
} }
}
// Remove redirects and tracking parameters from URL. // Remove redirects and tracking parameters from URL.
cleanURL, _ := removeTracking(article.Link) cleanURL, _ := removeTracking(article.Link)