input: Write a function to create a web crawler in Python that starts from a given website URL and performs the following tasks: scrapes the page content, identifies all outbound links on the page, and continues to crawl these links recursively, while avoiding revisiting already visited URLs. Ensure the function returns a dictionary where the keys are URLs that have been visited and the values are the respective page contents.
  
  def crawl(url):
   visited = set()
   queue = [url]
   pages = {}
   
   while queue:
   curr = queue.pop(0)
   visited.add(curr)
   response = requests.get(curr)
   
   if response.ok:
   soup = BeautifulSoup(response.text, 'html.parser')
   pages[curr] = soup.get_text()
  
  # find all the links
   links = soup.find_all('a', href=re.compile('^http'))
   
   for link in links:
   if link['href'] not in visited:
   queue.append(link['href'])
   
   return pages
  
  assert crawl('http://example.com')['http://example.com'] is not None
  assert crawl('http://example.com')['http://example.com'] != ''
  assert len(crawl('http://example.com')) > 1
output: def crawl(url):
      visited = set()
      queue = [url]
      pages = {}
      
      while queue:
          curr = queue.pop(0)
          visited.add(curr)
          response = requests.get(curr)
          
          if response.ok:
              soup = BeautifulSoup(response.text, 'html.parser')
              pages[curr] = soup.get_text()
  
              # find all the links
              links = soup.find_all('a', href=re.compile('^http'))
              
              for link in links:
                  if link['href'] not in visited:
                      queue.append(link['href'])
      
      return pages