From 9c45088948c9068a25be9a8a459c4453ef7e7bcd Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Thu, 2 Feb 2017 20:15:10 -0800 Subject: fix crash on import related to unparsed dates --- crawler/crawler.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crawler') 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 { -- cgit v1.2.3