diff options
-rw-r--r-- | crawler/crawler.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawler/crawler.go b/crawler/crawler.go index 3d98e02..ab776dc 100644 --- a/crawler/crawler.go +++ b/crawler/crawler.go @@ -72,8 +72,9 @@ func CrawlFeed(f *feed.Feed, ch chan<- string) { item.Description = encoded } - item.PublishDate = i.PublishedParsed.Format(time.RFC3339) - + if(i.PublishedParse != nil) { + item.PublishDate = i.PublishedParsed.Format(time.RFC3339) + } item.FeedId = f.Id err := item.Create() if err != nil { |