input: Write a function to create a web scraper that extracts specific data from a given website. The function should utilize the Python package BeautifulSoup to parse webpages and extract the required data by finding HTML elements using tags and attributes. Once the data is found, it should be converted into the desired format and stored.
  assert get_web_data("<url_of_webpage>")==["<url1>", "<url2>", "<url3>"]
  assert get_web_data("<another_url>")==["<url4>", "<url5>"]
  assert get_web_data("<invalid_url>")==[]
  assert get_web_data("")==[]
output: def get_web_data(url):
      try:
          from urllib.request import urlopen
          from bs4 import BeautifulSoup
          response = urlopen(url)
          soup = BeautifulSoup(response, 'html.parser')
          links = soup.find_all('a', href=True)
          return [link['href'] for link in links]
      except:
          return []