input: Write a function to create a web scraper that extracts specific data from a given website. The web scraper should utilize the Python package BeautifulSoup to parse webpages and extract the required data. BeautifulSoup will allow us to find HTML elements on the webpage using tags and attributes. Once the data is found, it can be converted into the desired format and stored.
  
  def extract_data_from_webpage(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 extract_data_from_webpage("https://example.com") == ['https://www.iana.org/domains/example']
  assert extract_data_from_webpage("https://google.com") == ['/intl/en/ads/', '/intl/en/about.html', '/intl/en/policies/privacy/', '/intl/en/policies/terms/', '/services']
  assert extract_data_from_webpage("https://github.com") == ['https://github.blog', 'https://docs.github.com', 'https://support.github.com', 'https://github.com/pricing', '/solutions', '/topics', '/collections', '/trending', 'https://lab.github.com/', 'https://opensource.guide', '/marketplace', '/login?return_to=%2F', '/join?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F']
  assert extract_data_from_webpage("https://invalidurl.com") == []
output: def extract_data_from_webpage(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