input: Write a function to scrape a given website and extract all the links present on the page. The function should return a list of URLs found on the page. If the website is inaccessible or empty, return an empty list.
  def scrape_links(url):
      import requests
      from bs4 import BeautifulSoup
      
      try:
          page = requests.get(url)
          soup = BeautifulSoup(page.text, 'html.parser')
          links = [a['href'] for a in soup.find_all('a', href=True)]
          return links
      except:
          return []
  
  assert scrape_links('https://example.com')==['https://example.com/link1', 'https://example.com/link2']
  assert scrape_links('https://nonexistent-website.com')==[]
  assert scrape_links('')==[]
  assert scrape_links('https://example.com/empty-page')==[]
output: def scrape_links(url):
      import requests
      from bs4 import BeautifulSoup
      
      try:
          page = requests.get(url)
          soup = BeautifulSoup(page.text, 'html.parser')
          links = [a['href'] for a in soup.find_all('a', href=True)]
          return links
      except:
          return []