input: Write a function to extract the titles of all YouTube videos from a given URL using the requests and re libraries in Python. The function should return a list of titles. If no titles are found, the function should return an empty list.
  assert extract_titles("https://www.youtube.com/user/Thexvid/videos") == ["Title1", "Title2", "Title3"]
output: def extract_titles(url):
      import requests
      import re
      response = requests.get(url)
      titles = re.findall(r'"title":{"runs":\[{"text":"([^"]+)"', response.text)
      return titles