def process_list_page(page)
      @logger.info("Processing list page with URL: #{page.uri}")
      #page.save_as "html/result-list.html"

      new_items_found = nil

      items = page.links #[0..50]   # TODO REMOVE [], getting sample only
      items_len = items.length - 1
      @total = @total + items_len
  #    pline "Found #{items_len} items in page", true
      items.each do |anchor|
        next if anchor.text == '../'

        new_items_found = false if new_items_found.nil? 
      
        pid = anchor.text.split('.').first
        link = "#{page.uri}#{anchor.href}"
        
        @logger.info "Got result with id #{pid}"
        
  #      pline "  Item #{@curr_property} of #{@total}..."
        # get detailed info

        begin
          article = Article.find_by_url link
          if article.nil?
            new_items_found = true
            article = process_fulltext_detail_page(@agent.get(link), pid)
            yield article, true
          else
            yield article, false
          end
        rescue => exception
          @logger.error "Error processing #{link}:"
          @logger.error exception
          @logger.error exception.backtrace.join("\n")
        end
        @curr_property = @curr_property + 1
      end
      new_items_found
    end
def process_list_page(page)
      @logger.info("Processing list page with URL: #{page.uri}")
      #page.save_as "html/result-list.html"

      new_items_found = nil

      items = page.links #[0..50]   # TODO REMOVE [], getting sample only
      items_len = items.length - 1
      @total = @total + items_len
  #    pline "Found #{items_len} items in page", true
      items.each do |anchor|
        next if anchor.text == '../'

        new_items_found = false if new_items_found.nil? 
      
        pid = anchor.text.split('.').first
        link = "#{page.uri}#{anchor.href}"
        
        @logger.info "Got result with id #{pid}"
        
  #      pline "  Item #{@curr_property} of #{@total}..."
        # get detailed info

        begin
          article = Article.find_by_url link
          if article.nil?
            new_items_found = true
            article = process_fulltext_detail_page(@agent.get(link), pid)
            yield article, true
          else
            yield article, false
          end
        rescue => exception
          @logger.error "Error processing #{link}:"
          @logger.error exception
          @logger.error exception.backtrace.join("\n")
        end
        @curr_property = @curr_property + 1
      end
      new_items_found
    end
NOTUSED by islam