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 the URL of the website as input and return a dictionary containing the title and content of the webpage.
  
  
  def scrape_homepage(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 ''
  
      # Find content
      content = html.find('div', {'class': 'content'})
      content_text = content.text if content else ''
  
      return {'title': title_text, 'content': content_text}
  
  
  assert scrape_homepage('https://www.example.com')=={'title': 'Example Domain', 'content': 'This domain is for use in illustrative examples in documents.'}
  assert scrape_homepage('https://www.nonexistentwebsite.com')=={'title': '', 'content': ''}
  assert scrape_homepage('https://www.google.com')=={'title': 'Google', 'content': ''}
output: def scrape_homepage(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')
          title_text = title.text if title else ''
  
          # Find content
          content = html.find('div', {'class': 'content'})
          content_text = content.text if content else ''
  
          return {'title': title_text, 'content': content_text}
      except:
          return {'title': '', 'content': ''}