input: Write a function to create a Python web scraper that collects and prints all the links from a given website URL. If the given URL is invalid or does not contain any links, the function should return an empty list. If no URL is provided, the function should return a message indicating that no URL was provided.
  assert collect_links("http://www.example.com/")==['http://www.example.com/']
  assert collect_links("http://www.example.com/invalid")==[]
  assert collect_links("")=="No URL provided"
output: def collect_links(url):
      if not url:
          return "No URL provided"
      try:
          import requests
          from bs4 import BeautifulSoup
          response = requests.get(url)
          response.raise_for_status()
          soup = BeautifulSoup(response.text, 'html.parser')
          links = [a['href'] for a in soup.find_all('a', href=True)]
          return links
      except:
          return []