code: def _parse_title(dom, details):
      
      title = details.find("h1")
  
      # if the header is missing, try to parse title from the <title> tag
      if not title:
          title = dom.find("title")
          assert title, "Can't find <title> tag!"
  
          return title[0].getContent().split("|")[0].strip()
  
      return title[0].getContent().strip()
docs: Parse title/name of the book.
  
      Args:
          dom (obj): HTMLElement containing whole HTML page.
          details (obj): HTMLElement containing slice of the page with details.
  
      Returns:
          str: Book's title.
  
      Raises:
          AssertionError: If title not found.