diff options
author | Adam Mathes <adam@trenchant.org> | 2017-02-02 19:42:48 -0800 |
---|---|---|
committer | Adam Mathes <adam@trenchant.org> | 2017-02-02 19:42:48 -0800 |
commit | dee417318bbed4cd14e21ec069ed5bc8d84df33b (patch) | |
tree | 4b87843f6c66148ea9fdb1ab44c1df234a04e233 /crawler | |
parent | 8ad7e867b96df3336c4fea8840297553125cc1d1 (diff) | |
download | neko-dee417318bbed4cd14e21ec069ed5bc8d84df33b.tar.gz neko-dee417318bbed4cd14e21ec069ed5bc8d84df33b.tar.bz2 neko-dee417318bbed4cd14e21ec069ed5bc8d84df33b.zip |
slightly better handling of dates
Diffstat (limited to 'crawler')
-rw-r--r-- | crawler/crawler.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crawler/crawler.go b/crawler/crawler.go index 4d91241..e884b23 100644 --- a/crawler/crawler.go +++ b/crawler/crawler.go @@ -63,17 +63,16 @@ func CrawlFeed(f *feed.Feed, ch chan<- string) { // a lot of RSS2.0 generated by wordpress and others // uses <content:encoded> - e,ok := i.Extensions["content"]["encoded"] var encoded = "" if ok { encoded = e[0].Value } - if len(encoded) > len(item.Description) { item.Description = encoded } - + + item.PublishDate = i.PublishedParsed.Format(time.RFC3339) item.FeedId = f.Id err := item.Create() |