input: Write a function to create a web scraper that uses the BeautifulSoup package to extract specific data from a given website. The function should parse webpages and extract the required data using HTML tags and attributes. Once the data is found, it should convert it into the desired format and store it.
  
  def create_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
  
  # Example usage:
  assert create_web_scraper("https://example.com") != []
  assert create_web_scraper("https://nonexistentwebsite.com") == []
output: def create_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