input: Write a function to scrape a webpage and collect all the links from the website. Return a list of all the links found. If no links are found, return an empty list.
  assert scrape_links("http://www.example.com/")==['http://www.iana.org/domains/example']
  assert scrape_links("http://www.google.com/")==['/intl/en/about.html', '/intl/en/policies/privacy/', '/intl/en/policies/terms/', '/preferences?hl=en', '/safebrowsing/diagnostic?hl=en&site=google.com', '/safebrowsing/report_error/', '/setprefdomain?prefdom=US&sig=__GLOXCrRZXUEBcMBOgxtVhwTQ9PU%3D', '/services/', '/store', 'https://accounts.google.com/ServiceLogin?hl=en&passive=true&continue=http://www.google.com/', 'https://www.google.com/services/', 'https://www.google.com/store/apps', 'https://www.google.com/doodles']
  assert scrape_links("http://www.nonexistentwebsite.com/")==[]
  assert scrape_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 []