input: Write a function to build a web scraper in Python that collects all the links from a given website URL. The function should take a URL as input and return a list of all the href attributes found in anchor tags on the webpage.
  assert web_scraper("http://www.example.com/")==["/", "/page1", "/page2", ...]
  assert web_scraper("http://www.example2.com/")==["/", "/about", "/contact", ...]
  assert web_scraper("http://www.nonexistenturl.com/")==[]
output: import requests
  from bs4 import BeautifulSoup
  
  def web_scraper(url):
      try:
          response = requests.get(url)
          response.raise_for_status()
          soup = BeautifulSoup(response.text, 'html.parser')
          links = [a['href'] for a in soup.find_all('a', href=True)]
          return links
      except:
          return []