input: Write a function to create a web scraper using Python that collects the title and content from the homepage of a given website. If the title or content is not found, return an empty string for that element.
  def web_scraper(url):
      import requests
      import bs4
      r = requests.get(url)
      html = bs4.BeautifulSoup(r.text,"html.parser")
      title = html.find('title').text if html.find('title') else ""
      content = html.find('div', {'class': 'content'}).text if html.find('div', {'class': 'content'}) else ""
      return title, content
  
  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://invalid-url.com')==('', '')
  assert web_scraper('https://www.non-existent-website.com')==('', '')
  assert web_scraper('https://www.example-missing-content.com')==('Example Missing Content', '')
  assert web_scraper('https://www.example-missing-title.com')==('', 'This website is missing a title.')
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")
          title = html.find('title').text if html.find('title') else ""
          content = html.find('div', {'class': 'content'}).text if html.find('div', {'class': 'content'}) else ""
          return title, content
      except:
          return "", ""