input: Write a function to create a web scraper in Python that can extract hotel reviews from the given TripAdvisor URL. If the webpage is successfully parsed, return a list of dictionaries containing the titles and texts of the reviews. If the webpage is not accessible or no reviews are found, return an empty list.
  assert create_web_scraper('<url of TripAdvisor hotel page>')==[{'title': 'Excellent stay!', 'text': 'We had a great time at this hotel.'}, {'title': 'Great service', 'text': 'The staff were very friendly and attentive.'}]
  assert create_web_scraper('<invalid url>')==[]
  assert create_web_scraper('<url of TripAdvisor hotel page with no reviews>')==[]
output: def create_web_scraper(url):
      import requests
      from bs4 import BeautifulSoup
      try:
          response = requests.get(url)
          response.raise_for_status()
          soup = BeautifulSoup(response.text, 'html.parser')
          reviews = []
          for review in soup.find_all('div', class_='review-container'):
              title = review.find('span', class_='noQuotes').text
              text = review.find('p', class_='partial_entry').text
              reviews.append({'title': title, 'text': text})
          return reviews
      except:
          return []