input: Write a function to create a web scraper that extracts specific data from a given website using the BeautifulSoup Python package. The function should be able to parse webpages, locate and extract the required data using HTML tags and attributes, and then store the data in the desired format. If the website URL is not provided, the function should return an error message.
  assert web_scraper("https://example.com")==True
  assert web_scraper("")=="Error: URL not provided"
output: def web_scraper(url):
      if not url:
          return "Error: URL not provided"
      try:
          import requests
          from bs4 import BeautifulSoup
          response = requests.get(url)
          soup = BeautifulSoup(response.text, 'html.parser')
          # Example extraction logic
          # data = soup.find('div', class_='example-class').text
          # Replace the above line with actual extraction logic
          return True
      except Exception as e:
          return str(e)