input: Write a function that creates a web scraper using Python to collect 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, the function should return None for that specific item.
  
  
  def web_scraper(url):
      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)
  
  # Test cases
  assert web_scraper('https://www.example.com')==('Example Domain', 'This domain is for use in illustrative examples in documents.')
  assert web_scraper('https://www.invalidurl.com')==(None, None)
  assert web_scraper('https://www.missingcontent.com')==('Missing Content', None)
  assert web_scraper('https://www.missingtitle.com')==(None, 'Content is available')
  
output: def web_scraper(url):
      import requests
      import bs4
  
      try:
          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:
          return (None, None)