input: Write a function to scrape an online news website and get the headlines. The function should take a URL as an input and return a list of headlines as strings.
  assert scrape_headlines("https://www.news.com/") == ["Headline 1", "Headline 2"]
  assert scrape_headlines("https://www.anothernews.com/") == ["Headline 3", "Headline 4", "Headline 5"]
  assert scrape_headlines("https://www.dummynews.com/") == []
output: import requests
  from bs4 import BeautifulSoup
  
  def scrape_headlines(url):
      response = requests.get(url)
      soup = BeautifulSoup(response.text, 'html.parser')
      headlines = [h.text.strip() for h in soup.find_all('h1')]
      return headlines