diff --git a/lib/rss_ntu_job.rb b/lib/rss_ntu_job.rb index e3a9b48..d612170 100644 --- a/lib/rss_ntu_job.rb +++ b/lib/rss_ntu_job.rb @@ -38,6 +38,7 @@ SITES.each_with_index do |(name, url), i| feed.items.each do |item| category = item.category.to_s.gsub(/\<(\/)*category\>/, '') + category = "未分類" if category.blank? if ( item.pubDate > yesterday ) && ( CATEGORIES[i][0] == "全部" || CATEGORIES[i].include?(category) ) recent_feed[item.title.strip] = { date: item.pubDate, description: item.description.gsub("\r\n", '
').strip,