input: Write a function to create a web scraper in Python that collects all the links from a given website URL. The function should take a string as input representing the URL and return a list of strings containing all the links found on the webpage.
  assert scrape_links("http://www.example.com/")==['http://www.iana.org/domains/example']
  assert scrape_links("http://www.python.org/")==["http://python.org/", "https://docs.python.org/3/", "https://docs.python.org/3/py-modindex.html", ...]  # truncated for brevity
  assert scrape_links("http://www.invalidwebsite.com/")==[]
  assert scrape_links("")==[]
output: import requests
  from bs4 import BeautifulSoup
  
  def scrape_links(url):
      if not url:
          return []
      try:
          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 []