def load_page(page)
    return if Page.visited.include?(page)

    html = open("https://projecteuler.net/archives;page=#{page}")
    fragment = Nokogiri::HTML(html)

    problem_links = fragment.css('#problems_table td a')

    i = (page - 1) * Page::LENGTH + 1
    problem_links.each do |link|
      Problem[i].title = link.text
      i += 1
    end

    Page.visited << page
  end
def load_page(page)
    return if Page.visited.include?(page)

    html = open("https://projecteuler.net/archives;page=#{page}")
    fragment = Nokogiri::HTML(html)

    problem_links = fragment.css('#problems_table td a')

    i = (page - 1) * Page::LENGTH + 1
    problem_links.each do |link|
      Problem[i].title = link.text
      i += 1
    end

    Page.visited << page
  end
Loads the problem numbers and titles for an individual page of the archive.