input: Write a function to scrape an online news website to get the headlines.
  def scrape_news_headlines(url):
      import requests
      from bs4 import BeautifulSoup 
  
      r = requests.get(url) 
      soup = BeautifulSoup(r.content, 'html5lib') 
  
      headlines = soup.find_all('h2') 
  
      return [headline.text for headline in headlines]
  assert scrape_news_headlines("http://www.example-news.com/")==['First Headline', 'Second Headline', 'Third Headline']
  assert scrape_news_headlines("http://www.example-news.com/page-with-no-headlines")==[]
  assert scrape_news_headlines("http://www.example-news.com/wrong-url")==[]
output: def scrape_news_headlines(url):
      import requests
      from bs4 import BeautifulSoup 
  
      r = requests.get(url) 
      soup = BeautifulSoup(r.content, 'html5lib') 
  
      headlines = soup.find_all('h2') 
  
      return [headline.text for headline in headlines]