from re import search


def img_from_html(html_str: str) -> str:
    """Scrubs the string of a html page for the b64 string of in image

    This function uses regex to scan the html template described in the render
    image function. It scans this template for the base 64 string encoded png
    image and extracts it from the template. This string is then returned.

    :param html_str: The string of the html page to be searched
    :type html_str: str
    :return: The Base 64 string of the png image
    :rtype: str
    """
    match_obj = search('data:image/png;base64,([^\']+)', html_str)
    if match_obj:
        match = match_obj.group(1)
        return match
    else:
        return ""