diff options
-rw-r--r-- | crawler/crawler.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crawler/crawler.go b/crawler/crawler.go index 504b4bb..0782c8f 100644 --- a/crawler/crawler.go +++ b/crawler/crawler.go @@ -75,8 +75,10 @@ func CrawlFeed(f *feed.Feed, ch chan<- string) { if(i.PublishedParsed != nil) { item.PublishDate = i.PublishedParsed.Format("2006-01-02 15:04:05") } - item.PublishDate = time.Now().Format("2006-01-02 15:04:05") - + else { + item.PublishDate = time.Now().Format("2006-01-02 15:04:05") + } + item.FeedId = f.Id err := item.Create() if err != nil { |