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:
parent
fedc958926
commit
a50d6c91ea
8
feed.go
8
feed.go
@ -42,17 +42,17 @@ func forwardLastFeed(url string) {
|
||||
postAge = *b.UpdatedParsed
|
||||
} else {
|
||||
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 {
|
||||
|
||||
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 {
|
||||
log.Println("No new content from: ", feed.Title)
|
||||
log.Println("No new content from: ", feed.Title, feed.Description)
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user