input: Write a function to create a web crawler in Python that starts from a given website URL, looks for other links in the page, and then scrapes the page content. The function should return the set of visited URLs and their corresponding scraped content.
  assert crawl('http://example.com') == {'visited_urls_and_scraped_content'}
  assert crawl('http://anotherexample.com') == {'visited_urls_and_scraped_content'}
  assert crawl('http://yetanotherexample.com') == {'visited_urls_and_scraped_content'}
output: 
  def crawl(url):
      from urllib.request import urlopen
      from bs4 import BeautifulSoup
      import re
  
      visited_urls = set()
      to_visit = [url]
      scraped_content = {}
  
      while to_visit:
          current_url = to_visit.pop(0)
          if current_url in visited_urls:
              continue
  
          try:
              response = urlopen(current_url)
              html = response.read()
              soup = BeautifulSoup(html, 'html.parser')
              content = soup.get_text()
              scraped_content[current_url] = content
              visited_urls.add(current_url)
  
              for link in soup.find_all('a', href=True):
                  new_url = link['href']
                  if new_url.startswith('/'):
                      new_url = current_url + new_url
                  elif not new_url.startswith('http'):
                      new_url = current_url + '/' + new_url
                  if new_url not in visited_urls:
                      to_visit.append(new_url)
          except:
              pass
  
      return scraped_content
  