Skip to content

Commit

Permalink
ensure the stuff returned by agent is actually string
Browse files Browse the repository at this point in the history
  • Loading branch information
siuying committed Jun 7, 2009
1 parent 9e9ba66 commit 756539b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fullfeed/feed.rb
Expand Up @@ -34,7 +34,7 @@ def initialize(url, options = {})
#Extraction is based on registered Extractor, check the extractor classes for more information.
def fetch
@logger.info "Fetch RSS URL: #{@url}"
doc = @agent.get(@url)
doc = @agent.get(@url).to_s
doc = to_utf8(doc)
@xml = Hpricot.XML(doc)
items = (@xml/"//item")
Expand Down Expand Up @@ -90,7 +90,7 @@ def extract(link)
begin
unless extractor.nil?
@logger.debug " Download link: #{link}"
doc = @agent.get(link)
doc = @agent.get(link).to_s
doc = to_utf8(doc)
return extractor.extract(doc)
else
Expand Down

0 comments on commit 756539b

Please sign in to comment.