input: Write a function to implement a web crawler in Python that starts from a given URL, visits all linked pages, and performs scraping on each page.
  assert crawl('https://example.com')
  assert crawl('https://test.com')
output: 
  import requests
  from bs4 import BeautifulSoup
  from urllib.parse import urljoin
  
  def crawl(start_url):
      visited = set()
      to_visit = [start_url]
      
      while to_visit:
          url = to_visit.pop(0)
          if url in visited:
              continue
          
          try:
              response = requests.get(url)
              if response.status_code == 200:
                  visited.add(url)
                  soup = BeautifulSoup(response.text, 'html.parser')
                  # Perform scraping here, for example:
                  # print(soup.title.string)
                  
                  for link in soup.find_all('a', href=True):
                      next_url = urljoin(url, link['href'])
                      if next_url not in visited:
                          to_visit.append(next_url)
          except requests.RequestException:
              continue
      
      return True
  