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 response, parse the HTML using BeautifulSoup, find all reviews in the HTML, and extract the title and text from each review. Finally, the function should print the extracted data. If the provided URL is invalid or the reviews cannot be found, the function should raise an exception.
  assert tripadvisor_scraper('<url>') is None
  assert tripadvisor_scraper('<valid_url>') is not None
output: def tripadvisor_scraper(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/58.0.3029.110 Safari/537.3'}
      
      try:
          response = requests.get(url, headers=headers)
          response.raise_for_status()
      except requests.exceptions.RequestException as e:
          raise Exception("Invalid URL or request error") from e
      
      soup = BeautifulSoup(response.text, 'html.parser')
      reviews = soup.find_all('div', class_='review-container')
      
      if not reviews:
          raise Exception("No reviews found")
      
      for review in reviews:
          title = review.find('span', class_='noQuotes').text
          text = review.find('p', class_='partial_entry').text
          print(f"Title: {title}\nText: {text}\n")