input: Write a function to scrape all the links from a given webpage. The function should take a URL as input, use the requests module to get the webpage content, and BeautifulSoup to parse the content and extract all the links. It should return a list of all the links found on the webpage.
  
  assert scrape_links("http://www.example.com/") == ["link1", "link2", "link3"]
  assert scrape_links("http://www.example2.com/") == ["link4", "link5", "link6"]
  assert scrape_links("") == []
  assert scrape_links("http://www.example3.com/") == ["link7", "link8"]
  assert scrape_links("http://www.nonexistentwebsite.com/") == []
output: def scrape_links(url):
      import requests
      from bs4 import BeautifulSoup
      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)]
      except:
          links = []
      return links