input: Write a function to scrape and extract the titles of all YouTube videos from a given URL. The function should return a list of titles or an empty list if no titles are found.
  
  def extract_youtube_titles(url):
      import requests
      import re
  
      r = requests.get(url)
      titles = re.findall('<a href="/watch\?v=([^"]+)">(.+?)<\/a>', r.content.decode('utf-8'))
      return [title[1] for title in titles]
  
  assert extract_youtube_titles("https://www.youtube.com/user/Thexvid/videos") != []
  assert extract_youtube_titles("https://www.youtube.com/user/nonexistent/videos") == []
  assert extract_youtube_titles("https://www.youtube.com/") == []
output: def extract_youtube_titles(url):
      import requests
      import re
  
      r = requests.get(url)
      titles = re.findall('<a href="/watch\?v=([^"]+)">(.+?)<\/a>', r.content.decode('utf-8'))
      return [title[1] for title in titles]