input: Write a function to build a web scraper in Python that collects all the links from a given website URL. The function should return a list of all the links found on the webpage.
  def scrape_links(url):
      response = req.get(url)
      if response.status_code != 200:
          return []
      soup = BeautifulSoup(response.text, 'html.parser')
      links = [link.get('href') for link in soup.find_all('a') if link.get('href')]
      return links
  
  assert scrape_links("http://www.example.com/") == ["http://www.iana.org/domains/example"]
  assert scrape_links("http://www.google.com/") == ["https://www.google.com/", "https://policies.google.com/privacy?hl=en", "https://policies.google.com/terms?hl=en"]
  assert scrape_links("http://www.invalidurl.com/") == []
output: def scrape_links(url):
      response = req.get(url)
      if response.status_code != 200:
          return []
      soup = BeautifulSoup(response.text, 'html.parser')
      links = [link.get('href') for link in soup.find_all('a') if link.get('href')]
      return links