input: Write a function to create a web scraper in Python that can extract hotel reviews from TripAdvisor. The function should accept a URL as input, make a request to this URL using appropriate headers, parse the HTML content using BeautifulSoup, locate all review containers, and print the title and text of each review. If the URL is empty, the function should return a message indicating no URL was provided.
  def scrape_tripadvisor_reviews(url):
      if not url:
          return "No URL provided for scraping."
  
      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'})
  
      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)
  
  assert scrape_tripadvisor_reviews('') == "No URL provided for scraping."
  assert scrape_tripadvisor_reviews('<valid_url>') == None
output: def scrape_tripadvisor_reviews(url):
      if not url:
          return "No URL provided for scraping."
  
      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'})
  
      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)