from __future__ import annotations
import re
import subprocess
import sys
from pathlib import Path
from urllib.parse import unquote
VIDEO_TAG_RE = re.compile(
r"",
re.IGNORECASE | re.DOTALL,
)
SOURCE_RE = re.compile(
r']+src=["\'](?P[^"\']+)["\'][^>]*>',
re.IGNORECASE,
)
def extract_src(video_attrs: str, video_body: str) -> str | None:
"""Extract video path from either