i_vis/core/version.py
def last_modified(
    url: str,
    request_args: Optional[Dict[str, Any]] = None,
    date_format: str = "%a, %d %b %Y %H:%M:%S GMT",
) -> Optional[datetime.date]:
    """Retrieve last modified from header of url.

    Args:
        url: Url to check header info.
        request_args: (Optional) Arguments forwarded to :module:`requests`.
        date_format: Expected data format in header info. Default: "%a, %d %b %Y %H:%M:%S GMT".

    Returns:
        Last modification datetime for ``url`` or None.
    """

    if not request_args:
        request_args = {}
    r = requests.head(url, timeout=100, **request_args)
    if r.status_code != 200:
        return None

    key = "Last-Modified"
    if key not in r.headers:
        return None
    return datetime.datetime.strptime(r.headers[key], date_format)
Retrieve last modified from header of url.

    Args:
        url: Url to check header info.
        request_args: (Optional) Arguments forwarded to :module:`requests`.
        date_format: Expected data format in header info. Default: "%a, %d %b %Y %H:%M:%S GMT".

    Returns:
        Last modification datetime for ``url`` or None.
    
Retrieve last modified from header of url.
Retrieve last modified from header of url .
def last_modified(
    url: str,
    request_args: Optional[Dict[str, Any]] = None,
    date_format: str = "%a, %d %b %Y %H:%M:%S GMT",
) -> Optional[datetime.date]:
    if not request_args:
        request_args = {}
    r = requests.head(url, timeout=100, **request_args)
    if r.status_code != 200:
        return None
    key = "Last-Modified"
    if key not in r.headers:
        return None
    return datetime.datetime.strptime(r.headers[key], date_format)
def last_modified ( url : str , request_args : Optional [ Dict [ str , Any ] ] = None , date_format : str = "%a, %d %b %Y %H:%M:%S GMT" , ) -> Optional [ datetime . date ] : if not request_args : request_args = { } r = requests . head ( url , timeout = 100 , ** request_args ) if r . status_code != 200 : return None key = "Last-Modified" if key not in r . headers : return None return datetime . datetime . strptime ( r . headers [ key ] , date_format )
Retrieve last modified from header of url.
Retrieve last modified from header of url .
"""Retrieve last modified from header of url.

    Args:
        url: Url to check header info.
        request_args: (Optional) Arguments forwarded to :module:`requests`.
        date_format: Expected data format in header info. Default: "%a, %d %b %Y %H:%M:%S GMT".

    Returns:
        Last modification datetime for ``url`` or None.
    """
Last modification datetime for ``url`` or None.
Last modification datetime for ` ` url ` ` or None .
url
str
Url to check header info.
Url to check header info .
request_args
Optional[Dict[str, Any]]
(Optional) Arguments forwarded to :module:`requests`.
( Optional ) Arguments forwarded to : module : ` requests ` .
date_format
str
Expected data format in header info.
Expected data format in header info .