input: Write a function to scrape all the links from a given website URL. The function should return a list of all the href attributes found in anchor tags ('<a>') on the webpage. If the request is unsuccessful or 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.invalidurl.com/")==[]
  assert scrape_links("http://www.google.com/")==['/intl/en/services/','http://www.google.com/imghp','http://maps.google.com/maps','https://play.google.com','http://www.youtube.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()
      except requests.RequestException:
          return []
      
      soup = BeautifulSoup(response.text, 'html.parser')
      links = [a['href'] for a in soup.find_all('a', href=True)]
      
      return links