Add uncategorized category
This commit is contained in:
parent
5c8f822993
commit
a85d87fc1f
|
@ -38,6 +38,7 @@ SITES.each_with_index do |(name, url), i|
|
||||||
|
|
||||||
feed.items.each do |item|
|
feed.items.each do |item|
|
||||||
category = item.category.to_s.gsub(/\<(\/)*category\>/, '')
|
category = item.category.to_s.gsub(/\<(\/)*category\>/, '')
|
||||||
|
category = "未分類" if category.blank?
|
||||||
|
|
||||||
if ( item.pubDate > yesterday ) && ( CATEGORIES[i][0] == "全部" || CATEGORIES[i].include?(category) )
|
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", '<br/>').strip,
|
recent_feed[item.title.strip] = { date: item.pubDate, description: item.description.gsub("\r\n", '<br/>').strip,
|
||||||
|
|
Loading…
Reference in New Issue