input: Write a function to create a web scraper that extracts specific data from a given website using the Python package BeautifulSoup. The function should take a URL as input and return the extracted data in the desired format.
  
  def web_scraper(url):
      import requests
      from bs4 import BeautifulSoup
  
      # Get the web page
      webpage = requests.get(url)
  
      # Parse the web page
      soup = BeautifulSoup(webpage.content, 'html.parser')
  
      # Find all 'a' tags
      links = soup.find_all('a')
  
      # Extract the URLs in the 'href' attribute
      extracted_data = [link.get('href') for link in links]
      
      return extracted_data
  
  assert web_scraper("https://example.com")==['/', '/page1', '/page2']
  assert web_scraper("https://another-example.com")==['/', '/link1', '/link2']
  assert web_scraper("https://yet-another-example.com")==['/', '/item1', '/item2']
  assert web_scraper("https://invalid-url.com")==[]
  assert web_scraper("")==[]
output: def web_scraper(url):
      import requests
      from bs4 import BeautifulSoup
  
      try:
          webpage = requests.get(url)
          soup = BeautifulSoup(webpage.content, 'html.parser')
          links = soup.find_all('a')
          extracted_data = [link.get('href') for link in links]
      except:
          extracted_data = []
      
      return extracted_data