input: Write a function to scrape an online news website to retrieve the headlines. The function should take the URL of the news website as input, fetch the HTML content, parse it using BeautifulSoup, and extract all the headlines from the page. Return the headlines as a list of strings.
  assert scrape_headlines("https://www.example-news.com/")==["Breaking News: Major Event", "Weather Forecast", "Sports Update"]
  assert scrape_headlines("https://www.anothernews.com/")==["Top Stories", "Local News", "World News"]
  assert scrape_headlines("https://www.empty-news.com/")==[]
  assert scrape_headlines("https://www.error-page.com/")==[]
  assert scrape_headlines("")==[]
output: import requests
  from bs4 import BeautifulSoup
  
  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 []