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, parse the webpage using BeautifulSoup, and return the extracted data in the desired format. If the URL is empty or invalid, the function should return an error message.
  assert web_scraper("https://example.com")!='Error'
  assert web_scraper("")=='Error'
  assert web_scraper("invalid_url")=='Error'
output: def web_scraper(url):
      if not url:
          return 'Error'
      try:
          import requests
          from bs4 import BeautifulSoup
          response = requests.get(url)
          response.raise_for_status()
          soup = BeautifulSoup(response.text, 'html.parser')
          # Add your code here to extract specific data from the soup object
          # For example, to extract all the text from the webpage:
          extracted_data = soup.get_text()
          return extracted_data
      except:
          return 'Error'