input: Write a function to create a web crawler in Python that starts from a given URL, finds and visits other links on the page, and then extracts the page content. Return the page content for each visited URL.
  
  import requests
  from bs4 import BeautifulSoup
  import re
  
  def crawl(url):
   visited = set()
   queue = [url] 
   page_content = {}
   
   while queue:
   curr = queue.pop(0)
   visited.add(curr) 
   response = requests.get(curr)
   
   if response.ok:
   soup = BeautifulSoup(response.text, 'html.parser')
  
  # scrape the page here 
   page_content[curr] = response.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 page_content
  
  assert crawl('http://example.com')=={'http://example.com': '[Expected HTML content for example.com]' }
  assert crawl('http://nonexistentwebsite.com')=={}
  
  Note: Replace '[Expected HTML content for example.com]' with the actual expected HTML content for the provided example URL.
output: def crawl(url):
      visited = set()
      queue = [url] 
      page_content = {}
      
      while queue:
          curr = queue.pop(0)
          visited.add(curr) 
          response = requests.get(curr)
          
          if response.ok:
              soup = BeautifulSoup(response.text, 'html.parser')
              page_content[curr] = response.text
              links = soup.find_all('a', href=re.compile('^http')) 
              
              for link in links:
                  if link['href'] not in visited:
                      queue.append(link['href'])
      return page_content