input: Write a function that creates a web scraper in Python to collect the title and content from the homepage of a given website. The function should accept a URL as input and return a dictionary containing the title and content of the website.
  
  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').text if html.find('title') else ""
      
      # Find content
      content = html.find('div', {'class': 'content'}).text if html.find('div', {'class': 'content'}) else ""
      
      return {'title': title, 'content': content}
  
  # Test cases
  assert web_scraper('https://www.example.com') == {'title': 'Example Domain', 'content': '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.invalidurl.com') == {'title': '', 'content': ''}
  assert web_scraper('https://www.nodivclasssite.com') == {'title': 'No Div Class Title', 'content': ''}
output: def web_scraper(url):
      import requests
      import bs4
      
      try:
          r = requests.get(url)
          r.raise_for_status()
          html = bs4.BeautifulSoup(r.text, "html.parser")
          
          # Find title
          title = html.find('title').text if html.find('title') else ""
          
          # Find content
          content = html.find('div', {'class': 'content'}).text if html.find('div', {'class': 'content'}) else ""
          
          return {'title': title, 'content': content}
      except:
          return {'title': '', 'content': ''}