input: Write a function `scrape_links` that takes a URL as input and returns a list of all the links found on the webpage. If the URL is invalid or no links are found, return an empty list.
  assert scrape_links("http://www.example.com/")==['/', '/about', '/contact', '/products', '/services']
  assert scrape_links("http://www.nonexistentwebsite.com/")==[]
  assert scrape_links("http://www.example.com/no_links")==[]
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 []