input: Write a function to create a web crawler in Python that starts from a given URL and looks for other links on the page, scrapes the page content, and continues this process for all discovered links. The function should take a URL as input and return a list of visited URLs and their scraped content.
  
  def crawl(url):
   visited = set()
   queue = [url]
   results = []
   
   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 
   content = soup.get_text()
   results.append({"url": curr, "content": content})
  
   # 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 results
  assert crawl('http://example.com') == [{"url": 'http://example.com', "content": 'Example Domain...'}]
  assert crawl('http://mock.com') == [{"url": 'http://mock.com', "content": 'Mock Page...'}]
  assert crawl('http://empty.com') == []
output: def crawl(url):
   visited = set()
   queue = [url]
   results = []
   
   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 
   content = soup.get_text()
   results.append({"url": curr, "content": content})
  
   # 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 results