input: Write a function to scrape all the links from a given website using Python. The function should return a list of links found on the webpage. If the website is inaccessible or no links are found, the function should return an empty list.
  assert scrape_links("http://www.example.com")==['http://www.iana.org/domains/example']
  assert scrape_links("https://www.wikipedia.org")==['https://en.wikipedia.org/', 'https://de.wikipedia.org/', 'https://fr.wikipedia.org/', 'https://es.wikipedia.org/', 'https://it.wikipedia.org/']
  assert scrape_links("http://invalid-url.com")==[]
  assert scrape_links("http://www.no-links.example.com")==[]
output: import requests
  from bs4 import BeautifulSoup
  
  def scrape_links(url):
      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 []