# File raggle, line 1637
      def parse_rss_url(url, last_modified = nil)
        begin
          content, modified = Engine::get_url(url, last_modified)
          $log.puts "content: #{content[0,80]}",
                    "modified: #{modified}" if content
        rescue
          raise "Couldn't get URL \"#{url}\": #$!."
        end

        @last_modified = modified
        if content && (!modified || modified != last_modified)
          # strip external entities (work-around for bug in REXML 2.7.1)
          content.gsub!(/<!ENTITY %.*?>/m, '') if \
            $config['strip_external_entities'] && content =~ /<!ENTITY %.*?>/m

          # parse URL content
          doc = REXML::Document.new content

          # get channel info
          e = nil
          @title = e.text if e = doc.root.elements['//channel/title']
          @link = e.text if e = doc.root.elements['//channel/link']
          @desc = e.text if e = doc.root.elements['//channel/description']
          @image = e.text if e = doc.root.elements['//image/url']
          @lang = e.text if e = doc.root.elements['//channel/language']
      
          # build list of feed items
          @items = []
          doc.root.elements.each('//item') { |e| 
            # get item attributes (the ones that are set, anyway... stupid
            # RSS)
            h = {}

            # basic item attribute element check
            ['title', 'link', 'date', 'description'].each { |val|
              h[val] = (t_e = e.elements[val]) ? fix_character_encoding(t_e) : ''
            }

            # more elaborate xpath checks for item attribute elements
            ['link', 'date', 'description'].each { |key|
              h[key] = find_element(e, key)
            }

            # insert new item
            @items << Feed::Item.new(h['title'], h['link'],
                                     h['description'], h['date'])
          }
        end
      end