import re


def _get_expiry(url):
    """
    Return the expiry time of a presigned URL
    """
    expires = 0
    match = re.search('Expires=(\d\d\d\d\d\d\d\d\d\d)', url)
    if match:
        expires = int(match.group(1))
    return expires