input: Write a function that creates a web scraper to extract specific data from a given website using the BeautifulSoup library in Python. The function should be named web_scraper and take a URL as an input. It should return a list of extracted URLs from all 'a' tags found on the webpage. If no URLs are found, it should return an empty list.
  assert web_scraper("https://example.com/")!=[]
  assert web_scraper("https://nonexistantpage.com/")==[]
output: def web_scraper(url):
      import requests
      from bs4 import BeautifulSoup
      try:
          response = requests.get(url)
          response.raise_for_status()
          soup = BeautifulSoup(response.text, 'html.parser')
          urls = [a['href'] for a in soup.find_all('a', href=True)]
          return urls
      except:
          return []