8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/omnom/source_parsers/feedburner.rb', line 8
def post_attributes(node)
node.document.root.add_namespace('feedburner', 'http://rssnamespace.org/feedburner/ext/1.0')
link = node.>('feedburner|origLink').first
link = node.>('link').first if link.blank?
{
title: node.>('title').first.text,
description: node.>('description').first.text,
guid: node.>('guid').first.text,
url: link.text,
published_at: node.>('pubDate').first.time,
thumbnail_url: node.drill([:>, 'media|thumbnail'], :first, [:attr, 'url']),
author_name: node.>('dc|creator').first.text,
tags: node.>('category').map(&:text) - ['TC']
}
end
|