1
0
mirror of https://git.keinpfusch.net/loweel/zorg synced 2024-12-19 00:03:28 +01:00

Filtering corrupted xml

This commit is contained in:
loweel 2023-07-15 01:06:56 +02:00
parent fedc958926
commit a50d6c91ea

View File

@ -42,17 +42,17 @@ func forwardLastFeed(url string) {
postAge = *b.UpdatedParsed postAge = *b.UpdatedParsed
} else { } else {
log.Println("No Published date or update date. This feed is crap, giving up") log.Println("No Published date or update date. This feed is crap, giving up")
postAge = time.Now() postAge = time.Now().Add(Zint + (1 * time.Hour))
} }
log.Println("Post Age: ", postAge) log.Println("Last Post Age: ", postAge)
if time.Since(postAge) < Zint { if time.Since(postAge) < Zint {
postOnMastodon(b.Link, "["+feed.Title+"] "+b.Title) postOnMastodon(b.Link, "["+feed.Title+"] "+b.Title)
log.Println("New content from: ", feed.Title, b.Title) log.Println("New content from: ", feed.Title, b.Title, feed.Description)
} else { } else {
log.Println("No new content from: ", feed.Title) log.Println("No new content from: ", feed.Title, feed.Description)
} }
} }