input: from typing import Set, List
  
  def crawl(url: str) -> Set[str]:
      """
      Create a web crawler that starts from a given URL and scrapes content from 
      the page and all linked pages found. The crawler will follow links 
      that start with 'http' and will keep track of visited pages to avoid 
      revisiting them. The function returns a set of URLs that were successfully 
      visited and scraped.
      >>> crawl("http://example.com")
      {'http://example.com/page1', 'http://example.com/page2', 'http://example.com/page3'}
      """
      visited = set()
      queue = [url] 
      
      while queue:
          curr = queue.pop(0)
          if curr in visited:
              continue
          visited.add(curr) 
          response = requests.get(curr)
          
          if response.ok:
              soup = BeautifulSoup(response.text, 'html.parser')
  
              # scrape the page here 
  
              # 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 visited
output:     from bs4 import BeautifulSoup
      import requests
      import re
  
      visited = set()
      queue = [url] 
      
      while queue:
          curr = queue.pop(0)
          if curr in visited:
              continue
          visited.add(curr) 
          response = requests.get(curr)
          
          if response.ok:
              soup = BeautifulSoup(response.text, 'html.parser')
  
              # scrape the page here 
  
              # 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 visited