From a06ccc15c903761e81a92b11b9f5475535cddb87 Mon Sep 17 00:00:00 2001 From: ilya Date: Fri, 23 Jul 2010 17:20:29 -0700 Subject: [PATCH] trying to subscribe to rafi --- lib/common.rb | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/lib/common.rb b/lib/common.rb index d8b1a9389..a2e67659a 100644 --- a/lib/common.rb +++ b/lib/common.rb @@ -36,51 +36,43 @@ module Diaspora ##author### def self.parse_service(doc) - doc.xpath('//generator').inner_html + doc.xpath('//generator').each{|x| return x.inner_html} end def self.parse_feed_url(doc) - doc.xpath('//id').first.inner_html + doc.xpath('//id').each{|x| return x.inner_html} end def self.parse_avatar_thumbnail(doc) - begin - doc.xpath('//logo').first.inner_html - rescue - puts "user has no thumbnail" - end + doc.xpath('//logo').each{|x| return x.inner_html} end def self.parse_username(doc) - doc.xpath('//author/name').first.inner_html + doc.xpath('//author/name').each{|x| return x.inner_html} end def self.parse_profile_url(doc) - doc.xpath('//author/uri').first.inner_html + doc.xpath('//author/uri').each{|x| return x.inner_html} end #entry## def self.parse_message(doc) - doc.xpath('//entry/title').first.inner_html + doc.xpath('//entry/title').each{|x| return x.inner_html} end def self.parse_permalink(doc) - doc.xpath('//entry/id').first.inner_html + doc.xpath('//entry/id').each{|x| return x.inner_html} end def self.parse_published_at(doc) - doc.xpath('//entry/published').first.inner_html + doc.xpath('//entry/published').each{|x| return x.inner_html} end def self.parse_updated_at(doc) - doc.xpath('//entry/updated').first.inner_html + doc.xpath('//entry/updated').each{|x| return x.inner_html} end - - def self.parse_objects(xml) - - end end