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 parse webpages and find HTML elements using tags and attributes, and then convert and store the extracted data into the desired format. If the provided URL is empty, the function should return an empty list.
  assert web_scraper("<url_of_webpage>")==["<extracted_url_1>", "<extracted_url_2>"]
  assert web_scraper("<url_of_another_webpage>")==["<extracted_url_1>"]
  assert web_scraper("")==[]
output: def web_scraper(url):
      if not url:
          return []
      import requests
      from bs4 import BeautifulSoup
      response = requests.get(url)
      soup = BeautifulSoup(response.text, 'html.parser')
      extracted_data = []
      for tag in soup.find_all('a', href=True):
          extracted_data.append(tag['href'])
      return extracted_data