import re
from datetime import datetime


def extract_data_from_filename(fname: str) -> list:
    """Extract datetime and other fields from filename from a video."""
    pattern: str = (r"^.*ALA_(\w)" + r"\)?_(\d)" +
                    r"_(\d{4})-(\d{2})-(\d{2})" +
                    r"_(\d{2})-(\d{2})-(\d{2}).*$")
    match: re.Match = re.fullmatch(pattern, fname)  # type: ignore
    data = [
        datetime(int(match.groups()[2]), int(match.groups()[3]),
                 int(match.groups()[4]), int(match.groups()[5]),
                 int(match.groups()[6]), int(match.groups()[7])), fname,
        match.groups()[0],
        int(match.groups()[1])
    ]
    return data