input: Write a function to scrape the headlines from a specified online news website using BeautifulSoup and requests libraries. The function should return a list of headlines. If no headlines are found, return an empty list.
  assert scrape_headlines("https://www.news.com/") == ["Headline 1", "Headline 2", "Headline 3"]
  assert scrape_headlines("https://www.nonexistentwebsite.com/") == []
  assert scrape_headlines("https://www.anothernews.com/") == ["Another Headline 1", "Another Headline 2"]
output: def scrape_headlines(url):
      try:
          response = requests.get(url)
          response.raise_for_status()
          soup = BeautifulSoup(response.text, 'html.parser')
          headlines = [h.text.strip() for h in soup.find_all('h1')]
          return headlines
      except:
          return []