input: Write a function to implement a web scraper in Python to extract the top ten trending YouTube videos. If the request to get the page content fails, the function should return an empty list. The function should also handle cases where there are fewer than ten trending videos.
  assert extract_trending_videos()==['Trending Video 1', 'Trending Video 2', 'Trending Video 3', 'Trending Video 4', 'Trending Video 5', 'Trending Video 6', 'Trending Video 7', 'Trending Video 8', 'Trending Video 9', 'Trending Video 10']
  assert extract_trending_videos()==[]
  assert extract_trending_videos()==['Short Video 1', 'Short Video 2', 'Short Video 3']
  assert extract_trending_videos()==[]
  assert extract_trending_videos()==[]
output: 
  def extract_trending_videos():
      try:
          response = requests.get('https://www.youtube.com/feed/trending')
          response.raise_for_status()
          soup = BeautifulSoup(response.text, 'html.parser')
          videos = soup.find_all('a', class_='yt-simple-endpoint style-scope ytd-video-renderer')
          return [video.get_text(strip=True) for video in videos[:10]]
      except:
          return []
  