input: Write a function to create a web scraper in Python that can extract hotel reviews from TripAdvisor. The function should take a URL as input and extract the titles and text of all reviews found on the page, printing them to the console. If there are no reviews on the page, the function should print "No reviews found." The function should handle the request with appropriate headers to mimic a real browser.
  
  
  def scrape_hotel_reviews(url):
      import requests
      from bs4 import BeautifulSoup
  
      # Define the headers
      headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36'}
  
      # Make a request and get HTML in response
      response = requests.get(url, headers=headers)
  
      # Parse HTML
      soup = BeautifulSoup(response.text, 'html.parser')
  
      # Find all reviews
      reviews = soup.find_all('div', {'class': 'review-container'})
  
      # If no reviews are found, print a message
      if not reviews:
          print("No reviews found.")
          return
  
      # Go through every review and extract the data
      for review in reviews:
          # Get the title
          title = review.find('span', {'class': 'noQuotes'}).text
  
          # Get the text
          text = review.find('p', {'class': 'partial_entry'}).text
  
          # Print for demo
          print(title)
          print(text)
          print('-' * 50)
  
  # Test cases
  scrape_hotel_reviews('https://www.tripadvisor.com/Hotel_Review-g60763-d122025-Reviews-The_Standard_New_York-New_York_City_New_York.html')
  scrape_hotel_reviews('https://www.tripadvisor.com/Hotel_Review-g60763-d122025-Reviews-The_Standard_New_York-New_York_City_New_York.html')  # Should print reviews
  scrape_hotel_reviews('https://www.example.com/no-reviews')  # Should print "No reviews found."
  
output: def scrape_hotel_reviews(url):
      import requests
      from bs4 import BeautifulSoup
  
      headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36'}
      response = requests.get(url, headers=headers)
      soup = BeautifulSoup(response.text, 'html.parser')
      reviews = soup.find_all('div', {'class': 'review-container'})
  
      if not reviews:
          print("No reviews found.")
          return
  
      for review in reviews:
          title = review.find('span', {'class': 'noQuotes'}).text
          text = review.find('p', {'class': 'partial_entry'}).text
          print(title)
          print(text)
          print('-' * 50)