import requests
from typing import Optional


def get_confirm_token(response: requests.models.Response) -> Optional[str]:
    """Get confirmation token from request's response

    Args:
        response (requests.models.Response): request's response

    Returns:
        Optional[str]: confirmation token if any available
    """
    for key, value in response.cookies.items():
        if key.startswith('download_warning'):
            return value

    return None