input: Write a function to create a web crawler in Python that starts from a given URL, looks for other links on the page, and scrapes the page content. If the given URL is invalid or unreachable, return 'Invalid URL'. If the crawling process is successful, return 'Crawling completed'. 
  
  def crawl(url):
   visited = set()
   queue = [url] 
   
   while queue:
   curr = queue.pop(0)
   visited.add(curr) 
   response = requests.get(curr)
   
   if not response.ok:
   return 'Invalid URL'
   
   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 'Crawling completed'
  
  assert crawl('http://example.com')=='Crawling completed'
  assert crawl('http://invalidurl.com')=='Invalid URL'
output: def crawl(url):
      visited = set()
      queue = [url]
  
      while queue:
          curr = queue.pop(0)
          visited.add(curr)
          try:
              response = requests.get(curr)
          except requests.exceptions.RequestException:
              return 'Invalid URL'
  
          if not response.ok:
              return 'Invalid URL'
  
          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 'Crawling completed'