input: Write a function to create a web scraper in Python that can extract hotel reviews from TripAdvisor. The function should define the URL and headers, make a request to get the HTML, parse the HTML, find all reviews, and for each review, extract and print the title and text.
  import requests
  from bs4 import BeautifulSoup
  
  def scrape_tripadvisor_reviews(url):
      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'})
  
      # Store the reviews
      extracted_reviews = []
  
      # 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
  
          # Append to the list for later use
          extracted_reviews.append((title, text))
  
      return extracted_reviews
  
  assert scrape_tripadvisor_reviews('<test_url>')[0][0] == 'Great Stay!'
  assert scrape_tripadvisor_reviews('<test_url>')[0][1] == 'We had a wonderful time at this hotel.'
  assert scrape_tripadvisor_reviews('<empty_url>') == []
output: def scrape_tripadvisor_reviews(url):
      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'})
      extracted_reviews = []
      for review in reviews:
          title = review.find('span', {'class': 'noQuotes'}).text
          text = review.find('p', {'class': 'partial_entry'}).text
          extracted_reviews.append((title, text))
      return extracted_reviews