Extract the title from a page.

  Args:
    page: a string
  Returns:
    a string

def get_title(page):
  """Extract the title from a page.

  Args:
    page: a string
  Returns:
    a string
  """
  start_pos = page.find("<title>")
  end_pos = page.find("</title>")
  assert start_pos != -1
  assert end_pos != -1
  start_pos += len("<title>")
  return text_encoder.to_unicode_utf8(page[start_pos:end_pos])