input: Write a function to create a web scraper in Python that collects the title and content from the homepage of a given website. The function should take a URL as input and return the title and content as a tuple. If the title or content is not found on the page, the function should return None for that respective item.
  
  def web_scraper(url):
      import requests
      import bs4
  
      r = requests.get(url)
      html = bs4.BeautifulSoup(r.text, "html.parser")
  
      title = html.find('title')
      content = html.find('div', {'class': 'content'})
  
      title_text = title.text if title else None
      content_text = content.text if content else None
  
      return (title_text, content_text)
  
  assert web_scraper('https://www.example.com')==('Example Domain', 'This domain is for use in illustrative examples in documents.')
  assert web_scraper('https://www.nonexistentwebsite.com')==(None, None)
  assert web_scraper('https://www.nohtmltags.com')==(None, None)
output: def web_scraper(url):
      import requests
      import bs4
  
      try:
          r = requests.get(url)
          html = bs4.BeautifulSoup(r.text, "html.parser")
  
          title = html.find('title')
          content = html.find('div', {'class': 'content'})
  
          title_text = title.text if title else None
          content_text = content.text if content else None
  
          return (title_text, content_text)
      except:
          return (None, None)