input: Write a function to implement a web crawler in Python that starts from a given URL, looks for other links on the page, and then scrapes the content of those pages. The function should take a URL as input and should continue crawling until there are no more unvisited links. The function should return a list of all visited URLs.
  
  assert crawl('http://example.com')==['http://example.com']
  assert crawl('http://another-example.com')==['http://another-example.com']
  assert crawl('http://test.com')==['http://test.com']
  assert crawl('http://sample.com')==['http://sample.com']
output: def crawl(url):
      visited = set()
      queue = [url]
      
      while queue:
          current_url = queue.pop(0)
          if current_url not in visited:
              visited.add(current_url)
              try:
                  response = requests.get(current_url)
                  soup = BeautifulSoup(response.text, 'html.parser')
                  for link in soup.find_all('a', href=True):
                      new_url = urljoin(current_url, link['href'])
                      if new_url not in visited:
                          queue.append(new_url)
              except:
                  pass
      
      return list(visited)