input: Write a function to create a web scraper using 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 strings. If any part of the scraping process fails, the function should return None for that part.
  
  
  def web_scraper(url):
      try:
          import requests
          import bs4
  
          r = requests.get(url)
          html = bs4.BeautifulSoup(r.text, "html.parser")
  
          # Find title
          title = html.find('title')
          title_text = title.text if title else None
  
          # Find content
          content = html.find('div', {'class': 'content'})
          content_text = content.text if content else None
  
          return title_text, content_text
      except Exception as e:
          print(f"Error: {e}")
          return None, None
  
  assert web_scraper('https://www.example.com')==('Example Domain', 'This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.')
  assert web_scraper('https://www.nonexistentexample.com') == (None, None)
  assert web_scraper('https://www.github.com') != (None, None)
  assert web_scraper('https://www.wikipedia.org') != (None, None)
  assert web_scraper('https://www.google.com') != (None, None)
  
output: def web_scraper(url):
      try:
          import requests
          import bs4
  
          r = requests.get(url)
          html = bs4.BeautifulSoup(r.text, "html.parser")
  
          # Find title
          title = html.find('title')
          title_text = title.text if title else None
  
          # Find content
          content = html.find('div', {'class': 'content'})
          content_text = content.text if content else None
  
          return title_text, content_text
      except Exception as e:
          return None, None